11 Commits

Author SHA1 Message Date
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
Denis Isaev
afc4b4344f
#66: properly merge (not overwrite) slice flags from config and command-line 2018-06-06 09:11:21 +03:00
golangci
85ee97f776 support config and fix issues in self project 2018-05-11 22:02:24 +03:00
golangci
6f384926cf fixes 2018-05-08 13:33:00 +03:00
golangci
c9d006d77a don't import packages twice for golint 2018-05-08 13:04:15 +03:00
golangci
e6657e868e don't analyze tests by default 2018-05-08 12:28:36 +03:00
golangci
4853151835 async issues processing 2018-05-07 21:44:40 +03:00
golangci
c9bb265140 fix small bugs 2018-05-07 17:30:33 +03:00
golangci
ffd2723a3d support gofmt and goimports 2018-05-06 09:41:48 +03:00
golangci
0e4998bb4f move code from golangci-worker to golangci-lint 2018-05-05 07:45:06 +03:00