Added Filter as a new JSON field for custom rules - #120
Open
ne0z wants to merge 4 commits into
Open
Conversation
Signed-off-by: Danang Heriyadi <danang.heriyadi19@gmail.com>
ne0z
requested review from
lucasbrunozup,
nathanmartinszup and
wiliansilvazup
as code owners
June 23, 2022 23:11
Contributor
|
@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 <danang.heriyadi19@gmail.com>
Author
|
@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 <danang.heriyadi19@gmail.com>
Signed-off-by: Danang Heriyadi <danang.heriyadi19@gmail.com>
This file contains hidden or 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
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 danang.heriyadi19@gmail.com
- 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