dependabot[bot]
56f27d0ad2
build(deps): bump github.com/securego/gosec/v2 from 2.9.3 to 2.9.5 ( #2413 )
...
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2021-12-14 05:18:18 +01:00
Oleksandr Redko
99c6516c6b
docs: fix grammar issues in comments ( #2352 )
2021-11-11 05:56:36 +01:00
Oleksandr Redko
1be9570abf
Refactor: preallocate slices ( #2340 )
2021-11-02 09:27:06 -07:00
Benjamin
e5cd59a607
dev: replace ioutil with io and os ( #2318 )
2021-11-01 20:21:26 +01:00
Nate Finch
9b577fcb80
new-from-rev: add support for finding issues in entire files in a diff ( #2264 )
2021-09-30 18:43:31 +02:00
subham sarkar
f08d330cbd
dev: fix interface implement check for "SkipDirs" ( #2078 )
2021-06-26 00:04:04 +02:00
Ludovic Fernandez
6172338bd4
nolintlint: fix false positive. ( #2013 )
2021-05-31 09:04:37 +02:00
Ludovic Fernandez
9aea4aee1c
typecheck: display compilation errors as report instead of error ( #1861 )
Extra / Vulnerability scanner (push) Has been cancelled
CI / go-mod (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Release a tag / release (push) Has been cancelled
CI / tests-on-windows (push) Has been cancelled
CI / tests-on-macos (push) Has been cancelled
CI / tests-on-unix (1.14) (push) Has been cancelled
CI / tests-on-unix (1.15) (push) Has been cancelled
CI / tests-on-unix (1.16) (push) Has been cancelled
CI / check_generated (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile.alpine]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled
2021-03-25 23:52:55 +01:00
Andrew Shannon Brown
e1a734e559
nolintlint: allow to fix //nolint lines ( #1583 )
2021-03-13 05:11:05 +01:00
Ludovic Fernandez
2ebc9d7202
dev: clean configuration and code ( #1830 )
2021-03-09 19:46:18 +01:00
Ludovic Fernandez
fce3949d5b
Deprecate 'scopelint' linter ( #1819 )
...
* Deprecate scopelint linter
* clean code base.
2021-03-09 10:19:22 -08:00
Ludovic Fernandez
94d2d803d2
Add gomoddirectives linter. ( #1817 )
2021-03-09 18:59:06 +01:00
Andrew Shannon Brown
306816ec85
Revert "Update nolintlint to fix nolint formatting and remove unused nolint statements ( #1573 )" ( #1584 )
...
This reverts commit aeb98303293570ba682ea933a4e9501a11a3aa99.
There are some cases that nolinter fixer wasn't handling properly or expectedly (#1579 , #1580 , #1581 ) so we'll fix those in a new attempt.
2020-12-27 11:49:58 -08:00
Andrew Shannon Brown
aeb9830329
Update nolintlint to fix nolint formatting and remove unused nolint statements ( #1573 )
...
Also allow multiple ranges to satisfy a nolint statement as having been used.
2020-12-27 06:18:02 -08:00
Dan Kortschak
33fe87b2a5
result/processors: treat all non-Go source as special autogenerated files
...
Prior to this change golangci-lint would attempt to follow //line
directives into generation description files unless they were in a small
set of fake files used by goyacc. Now we consider all non-Go source as
special.
2020-12-11 17:07:28 +10:30
iwankgb
947dae101e
Unknown linter breaks //nolint ( #1497 )
...
* Unknown linter breaks //nolint
* Testing if nolint directive for unknown linter silences violation on the same line
2020-11-09 08:33:24 +00:00
ac-rappi
9b3ba431f1
Added support for only specifying default severity ( #1396 )
2020-10-19 15:21:46 +11:00
Oleg Butuzov
6e7c317610
Sorting result.Issues implementation (golangci/golangci-lint#1217) ( #1218 )
2020-07-12 16:35:08 -05:00
Joe Wilner
6550984878
Configure path prefix via processor abstraction ( #1226 )
2020-07-11 09:14:52 +10:00
Duco van Amstel
5f0de2982b
Protect NewFilenameUnadjuster from concurrent map writes ( #1192 )
2020-06-25 14:57:49 +02:00
Soichiro Kashima
71b2f04e88
handle some block comment to detect generated files ( #1161 )
2020-05-25 19:36:46 +03:00
Ryan Currah
fa7adcbda9
add ability to set issue severity ( #1155 )
...
* add ability to set issue severity for out formats that support it based on severity rules
* fix lint issues
* change log child name
* code climate omit severity if empty
* add tests for severity rules, add support for case sensitive rules, fix lint issues, better doc comments, share processor test
* deduplicated rule logic into a base rule that can be used by multiple rule types, moved severity config to it's own parent key named severity, reduced size of NewRunner function to make it easier to read
* put validate function under base rule struct
* better validation error wording
* add Fingerprint and Description methods to Issue struct, made codeclimate reporter easier to read, checkstyle output is now pretty printed
2020-05-25 08:21:42 -04:00
Andrew Shannon Brown
90a8cd41bd
Fix up nolintlint comments and urls ( #1164 )
2020-05-24 10:08:14 +03:00
Isaev Denis
279b6d62d3
speed up a bit ( #1064 )
...
Ensure that `unused` is always the last
in execution order. It can speed up packages loading
a bit.
Refactor enabled linters set to remove extra logging.
Relates: #944
2020-05-05 18:45:19 +03:00
Isaev Denis
38782dd097
dev: use golangci-lint action ( #1066 )
2020-05-05 17:51:55 +03:00
Andrew Shannon Brown
ef44e11e17
Merge branch 'master' into asb/nolintlint-internal
2020-04-29 15:27:35 -07:00
Aleksandr Razumov
56f2b7d59d
fixer: add warning about possible line range issue
2020-04-27 20:11:42 +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
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
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
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
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
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
Aleksandr Razumov
8100507682
autogenerated_exclude: increase scanner max buffer size
...
Ref: #954
2020-02-28 14:09:52 +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
Craig Silverstein
06d26d5c12
Change writeFixedFile to replace the right line-range.
...
The function assumed, previously, that issue.Line always equals
issue.LineRange.From. But this needn't be true, and the code needn't
assume it. Now we actually replace the specified line-range.
2020-01-22 09:14:40 -08:00
to6ka
d137c2e18c
make uniq by line configurable ( #920 )
2020-01-19 16:49:46 +03:00
David Braley
be3c688da4
I473 ( #841 )
...
Support custom linters integration by plugins
Co-authored-by: Isaev Denis <idenx@yandex.com>
2020-01-08 13:51:55 +03:00
Igor Zibarev
ecccb24cb7
Fix autogen exclude for comments under package ( #831 )
2019-10-22 09:49:47 +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
Trevor Pounds
fd997edeeb
Cleanup nolint directives. ( #779 )
2019-10-03 19:34:19 +03: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
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
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
fc8d614b2b
speedup skip-dirs processing by caching
2019-09-14 20:15:11 +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
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
Isaev Denis
6864b2f764
dev: enable funlen on repo ( #668 )
2019-09-09 18:07:09 +03:00