137 Commits

Author SHA1 Message Date
Oleksandr Redko
0704271d8d
dev: refactor some test assertions (#4081) 2023-09-18 22:15:04 +02:00
dependabot[bot]
fb50d99ece
build(deps): bump github.com/securego/gosec/v2 from 2.16.0 to 2.17.0 (#4015)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-08-18 17:33:26 +02:00
Ludovic Fernandez
79c78d6f6f
feat: explain typecheck and remove it from the linter list (#3929) 2023-06-29 22:40:59 +02:00
Patrick Ohly
8fde4632fa
rules: support inverted path match (#3617) 2023-05-31 17:25:59 +02:00
Patrick Ohly
d92b38cc3e
fix: combination of --fix and --path-prefix (#3700)
Some checks failed
Release a tag / release (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/Dockerfile]) (push) Has been cancelled
Release a tag / docker-release (map[Dockerfile:build/alpine.Dockerfile]) (push) Has been cancelled
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-03-20 21:44:36 +01:00
Patrick Ohly
b40a5443b3
fix: consider path prefix when matching path patterns (#3571) 2023-03-17 23:29:55 +01:00
Oleksandr Redko
b673c5c1af
dev: replace pkg/errors with native error wrapping (#3604)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-02-22 01:35:43 +01:00
Oleksandr Redko
a221d01b41
docs: Replace links to godoc.org with pkg.go.dev (#3584)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2023-02-11 15:02:32 +01:00
Oleksandr Redko
d19398964c
chore: Do not use methods on pointer and value receivers (#3321) 2023-01-21 13:20:05 +00:00
Ludovic Fernandez
d03294f25f
fix: remove redundant character escape '\/' (#3278) 2022-10-06 00:09:31 +02:00
Ludovic Fernandez
8f00a10ad7
dev: improve tests on Windows (#3211) 2022-09-12 09:01:27 +02:00
Ludovic Fernandez
19a338706a
dev: reference all the debug keys and env vars (#3196) 2022-09-06 11:48:25 +00:00
Ludovic Fernandez
39f401ba3c
dev: review and clean linter tests (#3139) 2022-09-01 18:26:28 +02:00
Ludovic Fernandez
bddc63a234
dev: fix CI workflow for Windows (#3134) 2022-08-24 22:10:51 +02:00
Arjen van der Ende
890a82659b
Normalize exclude-rules paths for Windows (#2387) 2022-08-24 16:38:50 +02:00
Ludovic Fernandez
37d3aa437a
feat: deprecate varcheck, deadcode, and structcheck (#3125) 2022-08-21 21:37:47 +02:00
dependabot[bot]
9da04f5070
build(deps): bump github.com/go-critic/go-critic from 0.6.3 to 0.6.4 (#3089)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2022-08-14 18:21:32 +02:00
Ludovic Fernandez
f8f8f9a6e7
nolint: drop allow-leading-space option and add "nolint:all" (#3002) 2022-08-01 14:21:04 +02:00
Sasha Melentyev
a9dc1ce178
dev: change format like function without args (#3012)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2022-07-24 18:24:01 +02:00
Ludovic Fernandez
f9d815115c
bump golang.org/x/tools to HEAD (#2875)
* bump golang.org/x/tools to HEAD
* fix: adapt linters to the new validation system.
2022-05-23 12:39:57 +02:00
Iskander (Alex) Sharipov
29eedbf6e5
pkg/result/processors: compile nolint regexp only once (#2463) 2022-01-06 18:10:42 +01:00
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
dependabot[bot]
4ce9a19e7d
build(deps): bump github.com/go-critic/go-critic from 0.5.6 to 0.6.0 (#2041)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2021-10-23 00:51:11 +02: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)
Some checks failed
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