27 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
Denis Isaev
f62d607410
#37: add tab output format: --out-format=tab 2018-06-02 21:01:09 +03:00
Denis Isaev
0f6213dbc2
#60: search config file in directories from file path up to root 2018-06-02 20:28:53 +03:00
Denis Isaev
b0826710b5
#52: #36: lint test files by default: set --tests=false to disable it 2018-06-02 18:24:00 +03:00
Denis Isaev
4fd5ebe7c7
#49: don't fill string slice 2 times because of double parsing of options 2018-06-02 17:50:38 +03:00
golangci
9133ef4271 generate command line options section of README 2018-06-02 16:01:20 +03:00
golangci
034728ec94 generate parts of README automatically 2018-06-02 11:37:17 +03:00
golangci
0a111acaab refactor and don't print congrats if timeouted 2018-06-02 00:30:39 +03:00
Will Dixon
d46a5896b7 Add Depguard to supported linters 2018-05-31 23:19:41 -04:00
golangci
ef81b998ed #45: fix no results for gocyclo 2018-05-30 20:01:44 +03:00
golangci
b28bf5fbee #41: exit with code 4 if timeouted 2018-05-30 09:45:08 +03:00
golangci
5646c61c73 #40: fix panic in fast mode 2018-05-30 09:18:13 +03:00
golangci
b12c5591cd #33: don't pass not compiling packages to linters accepting loader.Program 2018-05-29 18:41:04 +03:00
golangci
ae5152c024 fix GOROOT after cross-compilation 2018-05-29 14:15:09 +03:00
golangci
f6b51b933e use gocyclo with changes for upstreaming, also speedup it 10x when program is loaded 2018-05-28 17:36:16 +03:00
golangci
f96d8ba829 fix vendoring and log concurrency 2018-05-27 11:27:21 +03:00
golangci
cc53468e1e #13: fix --fast option: allow enable disabled by --fast linters 2018-05-26 21:07:38 +03:00
golangci
b361146df8 #12: add TypeCheck linter to report compilation errors 2018-05-26 20:02:26 +03:00
xuri
5b8ffcaf76
Fix typo. 2018-05-26 21:59:09 +08:00
golangci
17c05c062b add column of issue line; disable welcome message by default 2018-05-26 09:48:16 +03:00
golangci
ab0ce75c06 Fill README section about performance 2018-05-19 22:40:14 +03:00
golangci
cdc1251fc0 optimize linters scheduling: run slow linters first 2018-05-19 16:20:43 +03:00
golangci
328b32ac61 fix config validation 2018-05-19 13:07:55 +03:00
golangci
f6b2d368a0 started README 2018-05-15 09:07:27 +03:00
golangci
5c2e6e9f5a .travis.yml and don't use internal package 2018-05-13 19:20:42 +03:00