Isaev Denis
52c9b88c25
reduce mem. usage of unused and update staticcheck ( #1063 )
...
The primary improvement is in early clearing of
analyzed package's TypeInfo, facts, etc for
whole program analyzers (`unused`). Clear it when it
becomes unused and GC collects them early. Initially this
clearing was performed for all analyzers except `unused`.
Update staticcheck from v0.0.1-2019.2.3 to v0.0.1-2020.1.4
Also in this commit:
* speed up loading packages from export data (2.5s -> 2.1s for std)
by not using mutex for export data since it was allowed in
x/tools#07722704da13
* make an order of execution of linters stable
* update renameio and robustio
* use robustio in caching
Relates: #987 , #994 , #995 , #1011
2020-05-03 15:20:17 +03:00
Tim Heckman
60fd647987
Update gosec linter to v2; add .test files to .gitignore ( #1062 )
...
This change updates the `gosec` linter to its v2 version. It seems like v2
maintained API compatibility for the functionality we use, so we only needed to
update the dependency and imports.
Please note, this does not use a tagged version of `gosec` and instead is the
latest `master` commit due to this issue: https://github.com/securego/gosec/issues/470 .
Once this issue is resolved we should update `gosec` to a tagged release.
This also adds a line to the `.gitignore` file, to ignore the `.test` output
files that get generated by `go test`. This could accidentally get left behind,
so no use committing binary files.
Fixes #1052
2020-05-03 14:05:00 +03:00
Andrew Shannon Brown
ef44e11e17
Merge branch 'master' into asb/nolintlint-internal
2020-04-29 15:27:35 -07:00
tdakkota
0d95fafefc
feat: add go-err113 linter support
2020-04-27 21:37:34 +03:00
Aleksandr Razumov
56f2b7d59d
fixer: add warning about possible line range issue
2020-04-27 20:11:42 +03:00
Aleksandr Razumov
3deb9d80ab
unused: check line range before suggesting fix
...
Fix #1048
2020-04-27 19:59:38 +03:00
Aleksandr Razumov
397a6a6732
Merge branch 'upgrade-gosec' of https://github.com/rung/golangci-lint into rung-upgrade-gosec
2020-04-27 13:07:03 +03:00
Andrew Shannon Brown
909f628d75
Add linter for nolint
...
Linter can check that nolint statements are properly formatted and also that all
nolint statements are used.
2020-04-26 20:20:17 -07:00
John Starich
36d8d881f9
Preserve API backward compatibility
2020-04-25 14:14:42 -05:00
John Starich
c55e7614d4
Re-enable default excludes by ID
2020-04-25 13:57:57 -05:00
Aleksandr Razumov
1373897abf
Merge branch 'tdakkota-feature/add-asciicheck-support'
2020-04-25 17:51:53 +03:00
Aleksandr Razumov
e2b927f029
Merge pull request #1036 from iwankgb/exclude-case-sensitive
...
Adding case-sensitive exclude processor
2020-04-24 12:48:42 +03:00
Maciej "Iwan" Iwanowski
078f44f8aa
Getting rid of code duplication
...
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-23 18:37:40 +02:00
Maciej "Iwan" Iwanowski
794a464435
Improving flag help message
...
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-23 09:36:25 +02:00
Maciej "Iwan" Iwanowski
94f8d6aacb
Ensuring interface implementation
...
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-23 09:32:55 +02:00
Maciej "Iwan" Iwanowski
d7772f542b
Using ExcludeRulesProcessor
...
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-23 09:27:48 +02:00
Maciej "Iwan" Iwanowski
05138497f2
Adding case sensitive exclude rules support
...
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-23 09:23:37 +02:00
Aleksandr Razumov
d00692c355
Merge branch 'nestif' of https://github.com/nakabonne/golangci-lint into nakabonne-nestif
2020-04-23 00:31:25 +03:00
Aleksandr Razumov
48361b9978
Merge pull request #852 from maratori/add-testpackage
...
Add linter testpackage
2020-04-23 00:17:33 +03:00
Aleksandr Razumov
aed4806aae
Merge pull request #1029 from kaka19ace/master
...
feat: [gocritic] support disabled-tags
2020-04-23 00:15:06 +03:00
tdakkota
92aa97e55e
feat: add asciicheck linter support
2020-04-22 19:55:05 +03:00
Maciej "Iwan" Iwanowski
a68b411e4a
Adding case-sensitive exclude processor
...
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-22 18:40:10 +02:00
Marat Reymers
9914737fc3
Add linter testpackage
2020-04-22 18:57:30 +03:00
kaka_ace
00cc2336c7
feat: [gocritic] support disabled-tags
2020-04-22 12:11:56 +08:00
Ryan Currah
990b43f19a
Merge remote-tracking branch 'golangci/master' into add-gomodguard-linter
2020-04-21 20:17:09 -04:00
nakabonne
9442a4132c
Use sort.SliceStable instead of sort.Slice
2020-04-22 08:53:50 +09:00
nakabonne
0108387c24
Add nestif linter
2020-04-22 08:51:43 +09:00
Aleksandr Razumov
3fd6db779e
Merge pull request #1017 from viktorasm/add-github-output-format
...
Adding github actions output format
2020-04-22 02:04:11 +03:00
Ryan Currah
6bb04d5ac0
use correct url, update gomodguard
2020-04-10 18:39:44 -04:00
Viktoras Makauskas
b7dada2249
slight cleanup
2020-04-11 00:41:24 +03:00
Viktoras
69a4e811d7
Update pkg/printers/github.go
...
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
2020-04-11 00:12:29 +03:00
Viktoras Makauskas
276e0d1e3b
Fixing linter issues
2020-04-11 00:11:37 +03:00
Viktoras
da4a14d827
Update pkg/printers/github.go
...
Co-Authored-By: Bot from GolangCI <42910462+golangcibot@users.noreply.github.com>
2020-04-11 00:02:35 +03:00
Viktoras Makauskas
ee2c62132c
Fixing linter issues
2020-04-10 23:59:07 +03:00
Viktoras Makauskas
d7222c7d38
Adding github actions output format
2020-04-10 23:46:19 +03:00
Ryan Currah
4292963937
do not error out when go.mod is missing just raise warning, change linter options
2020-04-05 17:49:27 -04:00
Ryan Currah
020b9e7103
added new linter gomodguard, disabled by default
2020-04-04 15:29:11 -04:00
Hiroki Suezawa
dfb22785dc
Upgrade gosec
2020-03-22 06:21:46 +09:00
Denis Krivak
58572c7789
Add new linter: godot
2020-03-16 11:56:57 +03:00
Simon Sawert
4a2147930a
Update wsl to v3.0.0
...
* Support to force cuddle with error checking
* Support to separate leading comments with empty lines
2020-03-15 13:36:57 +01:00
Aleksandr Razumov
e4643439b3
goanalysis: make failed prerequisites
error detailed
...
Print actual error along with dep name.
Ref: #827
2020-03-15 13:47:35 +03:00
Aleksandr Razumov
a2bc9b7a99
Merge pull request #937 from Khan/fix-range-start
...
Change writeFixedFile to replace the right line-range.
2020-03-12 20:29:04 +03:00
ferhat elmas
4d367808be
Support disable rule when enable-all is true
...
Similar to the behavior of command line flags:
enable-all to enable existing linters then disable unwanted ones.
But for vet rules.
2020-03-11 17:20:26 +01:00
Aleksandr Razumov
8100507682
autogenerated_exclude: increase scanner max buffer size
...
Ref: #954
2020-02-28 14:09:52 +03:00
Daniel Helfand
a999403d3a
change increase to increasing in timeout error
2020-02-18 11:42:58 -05:00
Trevor Pounds
c46c1b3224
Update to latest x/tools ( #930 )
...
* Update to latest x/tools (2020/01/19).
Fixes #893
* Initialize vet analyzers as unexportd global vars.
Fixes #915
* Support testing Go 1.14beta1.
* ci: reset go.mod and go.sum before generated diff check
* Update to latest x/tools (2020/02/04)
Co-authored-by: Aleksandr Razumov <ar@gortc.io>
2020-02-05 01:11:14 +03:00
Carlton Henderson
bec09851bf
fix #869 by removing lock file after unlocking ( #947 )
2020-02-04 23:47:39 +03:00
Aleksandr Razumov
18ab7a0005
autogenerated_exclude: increase scanner buffer ( #955 )
...
* autogenerated_exclude: increase scanner buffer
Some lines can be very long, so increase scanner
buffer to mitigate this.
Fix #954
2020-02-03 20:42:30 +03:00
Martins Irbe
42f2ad8a29
gocritic: update disabled check warning message
2020-02-03 16:38:27 +01:00
Aleksandr Razumov
5999fb0b0a
Merge pull request #944 from ksoichiro/fix-failed_prerequisites-error
...
Fix failed_prerequisites error
2020-02-03 00:49:20 +03:00