6 Commits

Author SHA1 Message Date
Patrick Ohly
b40a5443b3
fix: consider path prefix when matching path patterns (#3571) 2023-03-17 23:29:55 +01:00
Ludovic Fernandez
d03294f25f
fix: remove redundant character escape '\/' (#3278) 2022-10-06 00:09:31 +02:00
subham sarkar
f08d330cbd
dev: fix interface implement check for "SkipDirs" (#2078) 2021-06-26 00:04:04 +02:00
Isaev Denis
38782dd097
dev: use golangci-lint action (#1066) 2020-05-05 17:51:55 +03:00
Denis Isaev
2b587b63d6
Load AST for fast linters in different way.
Use build.Import instead of manual parser.ParseFile and paths traversal. It allows:
1. support build tags for all linters.
2. analyze files only for current GOOS/GOARCH: less false-positives.
3. analyze xtest packages (*_test) by golint: upstream golint and
gometalinter can't do it! And don't break analysis on the first xtest
package like it was before.
4. proper handling of xtest packages for linters like goconst where
package boundary is important: less false-positives is expected.

Also:
1. reuse AST parsing for golint and goconst: minor speedup.
2. allow to specify path (not only name) regexp for --skip-files and
--skip-dirs
3. add more default exclude filters for golint about commits:
`(comment on exported (method|function)|should have( a package)?
    comment|comment should be of the form)`
4. print skipped dir in verbose (-v) mode
5. refactor per-linter tests: declare arguments in comments, run only
one linter and in combination with slow linter
2018-06-10 23:46:24 +03:00
Denis Isaev
eee7e73dc1
#30: support --skip-files and --skip-dirs options: they skip files and dirs by regexps 2018-06-07 09:39:33 +03:00