Peter Štibraný
d47b6f5e48
Exposed modules-download-mode as a command line option ( #781 )
...
* Exposed modules-download-mode as a command line option
* Split line into two.
* Regenerated README.md file
2019-10-14 22:21:37 +03:00
Isaev Denis
fa69ddfc14
fix not cross-os file lock ( #818 )
2019-10-14 19:46:59 +03:00
Isaev Denis
48599c64ba
Make fine-grained hashing. ( #814 )
...
Speed up golint: don't typecheck packages twice.
Relates: #805
2019-10-14 09:50:57 +03:00
Isaev Denis
6e00f51fc1
Save issues into cache in parallel ( #813 )
...
Fix #810
2019-10-13 20:09:58 +03:00
Isaev Denis
64b62667c0
Lock by flock to prevent parallel runs ( #812 )
2019-10-13 18:10:22 +03:00
Isaev Denis
9ba730e989
Make incremental analysis ( #808 )
...
Cache linting results. Reanalyze only changed packages
and packages tree depending on them.
Fixes #768 , fixes #809
2019-10-13 17:40:51 +03:00
Isaev Denis
ca6effbeec
dev: discourage bad practices ( #803 )
2019-10-12 12:36:03 +03:00
Denis Titusov
0cc87df732
Rename deadline option to timeout and mark deadline as deprecated. ( #793 )
2019-10-08 09:37:54 +03:00
Simon Sawert
d4b4ad8dfe
Update WSL to v1.2.1 ( #794 )
...
* Update WSL to v1.2.1
* Add new tests for fixed false positives, don't derive defaults from WSL
2019-10-07 21:22:44 -04:00
Simon Sawert
3e09174bd2
Add WSL linter ( #771 )
...
* Add WSL linter
* Use v1.0.0 tag for wsl
* Don't add specific test file skip, use mutex to add errors
* Fix goimports error
* Add more tests for WSL, bump WSL version
* Fix bad go.sum (go mod tidy)
2019-10-04 16:03:40 -04:00
Denis Isaev
50cfc343c5
gocognit: fix default threshold from 0 to 30
2019-10-04 11:06:16 -04:00
NiseVoid
fbbd24575f
Update whitespace to v0.0.4 ( #786 )
2019-10-04 15:12:07 +03:00
Trevor Pounds
fd997edeeb
Cleanup nolint directives. ( #779 )
2019-10-03 19:34:19 +03:00
Ian Howell
39d7929d61
Improve the error output from goimports
...
This causes goimports to provide additional information if the
"local-prefixes" option has been set.
2019-10-03 10:00:34 -04:00
Nuruddin Ashr
92ec1a1f4c
Add gocognit linter ( #756 )
...
* Add gocognit linter
* Remove gocognit to the golangci config
* Make changes on README.md
* Remove gocognit from megacheck benchtest
* Remove command line flags
* Comply with new style
2019-10-03 16:22:06 +03:00
M. Ángel
5e54b3334e
Add version command to print golangci-lint version
...
Fixes #675
2019-10-01 18:13:24 -04:00
Trevor Pounds
6d786b50ae
Group imports by package.
2019-10-01 18:09:47 -04:00
Isaev Denis
df4f6766ba
reduce 1.5x memory usage on large repos on repeated runs ( #764 )
...
Get rid of AST cache: load AST when needed. Optimize memory allocations
for go/analysis actions.
Relates: #337
2019-10-01 14:52:00 +03:00
Trevor Pounds
ea417ffa0b
Fix incorrect description.
2019-09-30 17:28:43 -04:00
Isaev Denis
95ec0cf21e
dramatically reduce memory usage ( #758 )
...
Run all linters per package. It allows unloading package data when it's
processed. It dramatically reduces memory (and CPU because of GC) usage.
Relates: #337
2019-09-30 16:19:41 +03:00
Aleksandr Razumov
fe494af887
govet: skip internal analyzers ( #763 )
...
Some analyzers are not intended for direct usage and are
just build blocks for other analyzers.
Seems like we can distinguish them by ResultType nillness.
2019-09-30 16:04:06 +03:00
Aleksandr Razumov
7e09842e2b
govet: add more analyzers
2019-09-29 12:00:35 -04:00
Trevor Pounds
d63d23537d
Fix broken dominikh/go-tools URLs. ( #747 )
...
Fixes #654
2019-09-25 18:25:58 +03:00
Isaev Denis
2cadaf5beb
dev: enable whitespace, dogsled, funlen on the repo ( #746 )
2019-09-25 18:08:28 +03:00
Trevor Pounds
a16b4d872b
Use stretchr/testify to mock log.
...
Simplifies test log usage and removes additional
targets and dependencies to go:generate mocks.
2019-09-24 11:58:40 -04:00
Denis Isaev
2fc8b7b788
Drop memory usage of go/analysis linters 5x
...
Set analysis pass results to nil early to garbage collect them
soon.
Memory can be reduced for the following linters:
- staticcheck
- stylecheck
- gosimple
- govet
- bodyclose
- any future go/analysis linter
Relates: #712 , #634 , #628 , #598 , #509 , #483 , #337
2019-09-23 21:58:47 +03:00
Trevor Pounds
49297189a1
Manage build tools via go.mod.
2019-09-23 21:30:20 +03:00
NiseVoid
9976bdcc5e
Update whitespace
2019-09-23 12:16:06 -04:00
Denis Isaev
3aade55e05
Reduce memory usage of go/analysis
2019-09-23 09:52:54 +03:00
Trevor Pounds
92168d033d
Add dogsled linter. ( #705 )
2019-09-17 08:44:53 +03:00
Isaev Denis
6a979fb40d
Update staticcheck and cache go/analysis facts ( #699 )
...
* update staticcheck
Don't fork staticcheck: use the upstream version.
Remove unneeded SSA loading.
* Cache go/analysis facts
Don't load unneeded packages for go/analysis.
Repeated run of go/analysis linters now 10x faster
(2s vs 20s on this repo) than before.
2019-09-17 08:42:16 +03:00
Aleksandr Razumov
f3f5dfc3eb
govet: implement analyzers config ( #697 )
2019-09-16 00:15:08 +03:00
Will Dixon
9161de5b7d
Upgrade depguard to fix performance issue with go modules ( #698 )
...
* Upgrade depguard to fix performance issue with go modules
* Fix linting error of unused function
2019-09-15 14:13:16 +03:00
Denis Isaev
fc8d614b2b
speedup skip-dirs processing by caching
2019-09-14 20:15:11 +03:00
Trevor Pounds
e750fd1d15
Update to latest securego/gosec. ( #694 )
...
Fixes https://github.com/securego/gosec/pull/366 .
2019-09-14 19:34:59 +03:00
Isaev Denis
c9a9255238
Speed up packages loading ( #693 )
...
Don't perform extra go env calls in go/packages.
Load only needed go env vars in golangci-lint.
Stay in sync by enabled analyzers in go vet: remove nilness and
atomicalign analyzers, add errorsas analyzer.
Don't build SSA for govet.
Standalone govet runs 25% faster than before. All runs can be 5-10% faster
than before.
Relates: #208
2019-09-14 18:48:18 +03:00
Trevor Pounds
2e8d83266f
Update dependencies. ( #684 )
...
* Update deps.
* Update to Node.js v10.16.3 LTS.
* Fix mock logutils generation.
2019-09-12 16:02:43 +03:00
Isaev Denis
bf67a3eef3
update gosec ( #681 )
2019-09-11 17:46:26 +03:00
Isaev Denis
b08335850e
update scopelint ( #680 )
2019-09-11 17:35:08 +03:00
Matouš Dzivjak
58845813da
linters: add Godox linter support ( #621 )
...
Godox is linter for TODOs and FIXMEs left in the code.
Signed-off-by: Matous Dzivjak <matous.dzivjak@kiwi.com>
2019-09-11 16:53:40 +03:00
Denis Isaev
4495f893b9
Log go/analysis panics, don't crash
...
go/analysis panics were propagated to main and crashed golangci-lint.
Just log them, as with other linters.
Found in #608 .
2019-09-10 18:49:34 +03:00
Isaev Denis
f1c1dbfab4
Feature/enable autofix on whitespace ( #674 )
...
The whitespace linter was added in #673 . Enable it and fix found issues.
Add auto-fixing to the whitespace linter.
2019-09-10 16:56:44 +03:00
NiseVoid
c7dee2c0b2
Add whitespace linter ( #673 )
2019-09-10 13:25:01 +03:00
Denis Isaev
5fb91e6434
docs: document bash completion in README
...
Also, change command `golangci-lint completion`
to `golangci-lint completion bash`.
2019-09-10 12:06:10 +03:00
Christoph Blecker
91e90eba6b
Add support for bash completions ( #640 )
2019-09-10 11:30:02 +03:00
Glen Mailer
97fcafd38c
Update format of junit xml output to mark failures as such ( #632 )
2019-09-10 11:21:08 +03:00
Denis Isaev
bad04bb737
dev: regenerate README.md after #630
...
Also, output help for the new option in a more compact way.
2019-09-10 11:17:18 +03:00
Sean DuBois
f312a0fc4e
fix #416 : Add skip-dirs-use-default ( #630 )
2019-09-10 11:14:25 +03:00
Isaev Denis
6163a8a790
Support go1.13 ( #670 )
...
Setup Travis CI to run on go 1.12 and 1.13.
Update info about go versions in README.
Rebuild go.mod,go.sum on go1.13.
2019-09-09 21:54:56 +03:00
Cody Ley-Han
a8f2c27d1d
Add user supplied error messages in depguard issues ( #662 )
2019-09-09 20:46:55 +03:00