-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'make-defectdojo-tag-duplicates' into dependency-track-p…
…arser
- Loading branch information
Showing
8,017 changed files
with
2,500,473 additions
and
40,064 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,43 @@ | ||
--- | ||
name: Lint | ||
on: | ||
pull_request: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- synchronize | ||
- reopened | ||
branches: | ||
- main | ||
|
||
env: | ||
PLZ_CONFIG_PROFILE: ci | ||
SEGMENT_DOWNLOAD_TIMEOUT_MINS: "2" | ||
|
||
permissions: | ||
# Grant the ability to checkout the repository | ||
contents: read | ||
|
||
# Allow reviewdog to comment on PRs | ||
# Grant the ability to write comments on a pull request | ||
pull-requests: write | ||
|
||
jobs: | ||
build: | ||
lint: | ||
name: Lint | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | ||
cancel-in-progress: true | ||
steps: | ||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
uses: actions/checkout@v4 | ||
|
||
- name: Cache plz | ||
id: cache-plz | ||
uses: actions/cache@v3 | ||
- name: Setup Go 1.21.6 | ||
uses: actions/setup-go@v4 | ||
with: | ||
path: .plz-cache | ||
key: ${{ runner.os }}-plz | ||
go-version: 1.21.6 | ||
|
||
- name: Setup reviewdog | ||
run: go install github.com/reviewdog/reviewdog/cmd/reviewdog@latest | ||
|
||
- name: Install linters | ||
run: make install-lint-tools | ||
|
||
- name: Lint | ||
env: | ||
REVIEWDOG_GITHUB_API_TOKEN: "${{ github.token }}" | ||
GOLANGCI_LINT_CACHE: "${{ github.workspace }}/.golangci-lint-cache" | ||
run: "./pleasew -p -v=2 lint" | ||
REVIEWDOG_GITHUB_API_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
run: make lint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
/dist/ | ||
/vendor/ | ||
__pycache__ | ||
*.pyc | ||
**/node_modules/ | ||
.plz_clean* | ||
|
||
# Entries below this point are managed by Please (DO NOT EDIT) | ||
plz-out | ||
.plzconfig.local | ||
bin | ||
.custom_image | ||
tests/output |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,45 @@ | ||
--- | ||
runner: | ||
go/vet: | ||
cmd: go vet $(go list ./... | grep -v /vendor/ | grep -v github.com/ocurity/dracon/api/proto/) | ||
format: govet | ||
|
||
go/staticcheck: | ||
cmd: | | ||
./pleasew run //third_party/binary/dominikh/go-tools:staticcheck -- $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs) | ||
errorformat: | ||
- '%E%f:%l:%c: %m' | ||
cmd: staticcheck $(go list ./... | grep -v /vendor/ | grep -v github.com/ocurity/dracon/api/proto) | ||
format: staticcheck | ||
|
||
go/revive: | ||
cmd: | | ||
./pleasew run //third_party/binary/mgechev/revive:revive -- $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs) | ||
cmd: revive -exclude ./vendor/... -exclude ./api/proto/... -config revive.toml ./... | ||
errorformat: | ||
- '%E%f:%l:%c: %m' | ||
|
||
go/vet: | ||
cmd: | | ||
./pleasew run "//third_party/go:toolchain|go" -- vet $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs) | ||
- '%f:%l:%c: %m' | ||
|
||
go/containedctx: | ||
cmd: go vet -vettool=$(which containedctx) $(go list ./... | grep -v /vendor/ | grep -v github.com/ocurity/dracon/api/proto) | ||
errorformat: | ||
- '%E%f:%l:%c: %m' | ||
- '%f:%l:%c: %m' | ||
|
||
go/gosec: | ||
cmd: | | ||
./pleasew run //third_party/binary/securego/gosec:gosec -- -fmt golint $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs) | ||
go/ineffassign: | ||
cmd: ineffassign $(go list ./... | grep -v /vendor/ | grep -v github.com/ocurity/dracon/api/proto) | ||
errorformat: | ||
- '%E%f:%l:%c: %m' | ||
- '%f:%l:%c: %m' | ||
|
||
go/fmt: | ||
cmd: | | ||
./pleasew run //third_party/go/mvdan.cc/gofumpt:gofumpt -- -d $(./pleasew query alltargets --include go | grep -v "//third_party/" | cut -f3- -d/ | cut -f1 -d: | awk '{ print "./" $0 }' | xargs) | ||
format: diff | ||
level: error | ||
go/errorlint: | ||
cmd: go-errorlint -errorf-multi -errorf -test $(go list ./... | grep -v /vendor/ | grep -v github.com/ocurity/dracon/api/proto) | ||
errorformat: | ||
- '%f:%l:%c: %m' | ||
|
||
buf_lint: | ||
cmd: ./pleasew run "//third_party/binary/bufbuild/buf:buf|buf" -- lint --path api/ | ||
level: error | ||
go/errcheck: | ||
cmd: errcheck -asserts -blank $(go list ./... | grep -v /vendor/ | grep -v github.com/ocurity/dracon/api/proto) | ||
errorformat: | ||
- '%f:%l:%c:%m' | ||
|
||
buf_format: | ||
cmd: ./pleasew run "//third_party/binary/bufbuild/buf:buf|buf" -- format --diff --path api/ | ||
format: diff | ||
# TODO: figure out how to set errorformat to parse the error output | ||
# actionlint: | ||
# cmd: actionlint | ||
# errorformat: | ||
# - | ||
|
||
buf_lint: | ||
cmd: buf lint . --path ./api/ | ||
level: error | ||
format: buf |
Oops, something went wrong.