-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Filter as a new JSON field for custom rules #120
Open
ne0z
wants to merge
4
commits into
ZupIT:main
Choose a base branch
from
ne0z:improvement/filter-file-rule
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
Signed-off-by: Danang Heriyadi <[email protected]>
ne0z
requested review from
wiliansilvazup,
lucasbrunozup and
nathanmartinszup
as code owners
June 23, 2022 23:11
@ne0z tnks for contribution I added some comments into the issue opened check for update this PR. And after add tests you can run command: "make format" and "make lint" to fix problems reported in pipeline :) |
Signed-off-by: Danang Heriyadi <[email protected]>
@wiliansilvazup thanks for the advice, I have fixed the linter. Tested on apple M1 shows as below : $ make lint
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
golangci-lint run -v --timeout=5m -c .golangci.yml ./...
INFO [config_reader] Used config file .golangci.yml
INFO [lintersdb] Active 45 linters: [bodyclose deadcode depguard dogsled dupl errcheck errorlint exhaustive exportloopref funlen gci gochecknoinits gocognit goconst gocritic gocyclo gofmt gofumpt goimports gomnd goprintffuncname gosec gosimple govet ineffassign lll misspell nakedret nestif nlreturn noctx nolintlint revive rowserrcheck staticcheck structcheck stylecheck testpackage typecheck unconvert unparam unused varcheck whitespace wsl]
INFO [loader] Go packages loading at mode 575 (imports|name|types_sizes|compiled_files|deps|exports_file|files) took 130.183833ms
INFO [runner/filename_unadjuster] Pre-built 0 adjustments in 652.042µs
WARN [linters context] gci: `local-prefixes` is deprecated, use `sections` and `prefix(github.com/ZupIT/horusec-engine)` instead.
INFO [linters context/goanalysis] analyzers took 0s with no stages
INFO [runner/skip dirs] Skipped 4 issues from dir text/examples/go/example2 by pattern examples/
INFO [runner] Issues before processing: 37, after processing: 0
INFO [runner] Processors filtering stat (out/in): nolint: 0/12, exclude-rules: 12/25, path_prettifier: 37/37, skip_files: 29/37, skip_dirs: 25/29, exclude: 25/25, autogenerated_exclude: 25/25, cgo: 37/37, filename_unadjuster: 37/37, identifier_marker: 25/25
INFO [runner] processing took 1.896631ms with stages: exclude-rules: 625.584µs, nolint: 575.042µs, identifier_marker: 353.292µs, autogenerated_exclude: 141.375µs, path_prettifier: 124.667µs, skip_files: 49.167µs, skip_dirs: 19.917µs, cgo: 3.958µs, filename_unadjuster: 1.542µs, max_same_issues: 458ns, severity-rules: 251ns, uniq_by_line: 250ns, max_from_linter: 250ns, source_code: 209ns, exclude: 209ns, max_per_file_from_linter: 167ns, path_shortener: 84ns, diff: 84ns, path_prefixer: 84ns, sort_results: 41ns
INFO [runner] linters took 31.033208ms with stages: goanalysis_metalinter: 29.102375ms
INFO File cache stats: 0 entries of total size 0B
INFO Memory: 3 samples, avg is 54.1MB, max is 72.8MB
INFO Execution took 168.337042ms |
…ruct Signed-off-by: Danang Heriyadi <[email protected]>
Signed-off-by: Danang Heriyadi <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Danang Heriyadi [email protected]
- What I did
Add filter file feature to horusec-engine. This PR is related to this issue ZupIT/horusec#1077
- How to verify it
- Description for the changelog