142 Commits

Author SHA1 Message Date
Oleksandr Redko
99c6516c6b
docs: fix grammar issues in comments (#2352) 2021-11-11 05:56:36 +01:00
Sebastien Rosset
2c01ea7ff2
gocritic: add support for variable substitution in ruleguard path settings (#2308)
* Add  variable for ruleguard config directory

* Add  variable for ruleguard config directory

* Add  variable for ruleguard config directory

* Add  variable for ruleguard config directory

* Add unit tests

* Add unit tests for ruleguard

* Add unit tests for ruleguard

* Add unit tests for ruleguard

* Add unit tests for ruleguard, fix package name
2021-11-02 11:34:19 -07:00
Oleksandr Redko
1be9570abf
Refactor: preallocate slices (#2340) 2021-11-02 09:27:06 -07:00
Ludovic Fernandez
a8887d5655
fix: don't hide enable-all option (#2338) 2021-11-02 14:02:23 +01:00
Benjamin
e5cd59a607
dev: replace ioutil with io and os (#2318) 2021-11-01 20:21:26 +01:00
Sebastien Rosset
bdc2f96de9
Add code comments to document source code (#2306) 2021-10-25 00:06:58 +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
Tam Mach
a6fcf6f001
cleanup: Remove completion subcommand (#2107) 2021-07-07 13:07:49 +02:00
Matthew Cobbing
2862ca630c
output: generate HTML report (#2043) 2021-06-08 01:33:40 +02:00
Ludovic Fernandez
505ed3c0f7
doc: Un-deprecate enable-all option. (#2039) 2021-06-02 17:04:48 +02:00
Ludovic Fernandez
cf8fd685d0
revive: fix add-constant rule support. (#2003) 2021-05-19 17:39:10 +02:00
Ludovic Fernandez
9cb902cdf2
fix: comma in exclude pattern leads to unexpected results (#1917) 2021-04-19 15:20:49 +02:00
Borja Clemente
814bf0e0ad
Set version command output to Stdout (#1869) 2021-03-24 17:43:56 +01:00
Sergey Vilgelm
b77118fdac
Use errcheck from main repo instead of golangci-lint fork (#1319)
Co-authored-by: Roman Leventov <leventov@ya.ru>
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
2021-02-25 13:16:48 +01:00
Sergey Vilgelm
251b205f54
Deprecate Interfacer linter (#1755) 2021-02-20 18:55:11 -06:00
James Lucktaylor
000a815656
fix(cmd/linters): truncate multiline descriptions (#1663) 2021-02-07 04:35:31 +01:00
iwankgb
d32798769c
Cobra.Command.SetOutput is depracated (#1554) 2020-12-13 00:01:31 +00:00
iwankgb
164cfab820
Removing reference to no-longer-existing linter-in-the-cloud (#1553) 2020-12-12 21:59:15 +00:00
iwankgb
993337baa2
Using upstrem goconst (#1500)
github.com/golangci/goconst is now obsolete :)
2020-11-17 19:07:37 +00:00
Tam Mach
073e590a63
feat(completion): Add support for powershell completion (#1408)
This commit is to add support for powershell completion script.

Note: PowerShell v5.0+ is required
2020-10-10 19:11:00 +02:00
Tam Mach
5f93c930a1
Add support for fish completion (#1201)
Co-authored-by: Sascha Grunert <sgrunert@suse.com>
2020-09-21 07:50:06 +10:00
Romanos
1a2a672644
Allow for serializing multiple golangci-lint invocations (#1302)
By default, golangci-lint fails after five seconds if another instance
is running. It is possible to disable that, but the discussion around
whether the cache is safe to use concurrently is not exactly full of
confidence. Add a flag that allows golangci-lint to wait forever
instead of failing.

see #1301
2020-08-28 14:06:28 +08:00
Sergey Vilgelm
a35fd6e91a
Support short and json formats for version cmd (#1315) 2020-08-20 08:57:41 -05: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
sonata
b98fda6f34
Enable linters for golangci-lint (#1221)
* Enable linters for golangci-lint

* Remove unused nolint

* Fix lint
2020-07-10 10:50:06 +09:00
Isaev Denis
cb58d1f82e
speed up CI and golangci-lint (#1070)
Run CI on mac os only with go1.13 and on windows only on go1.14.
Speed up tests. Introduce --allow-parallel-runners.
Block on parallel run lock 5s instead of 60s.
Don't invalidate analysis cache for minor config changes.
2020-05-09 15:15:34 +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
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
c55e7614d4 Re-enable default excludes by ID 2020-04-25 13:57:57 -05: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
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
a68b411e4a
Adding case-sensitive exclude processor
Signed-off-by: Maciej "Iwan" Iwanowski <maciej.iwanowski@critical.today>
2020-04-22 18:40:10 +02:00
Viktoras Makauskas
d7222c7d38 Adding github actions output format 2020-04-10 23:46:19 +03:00
Daniel Helfand
a999403d3a change increase to increasing in timeout error 2020-02-18 11:42:58 -05:00
Carlton Henderson
bec09851bf
fix #869 by removing lock file after unlocking (#947) 2020-02-04 23:47:39 +03:00
Isaev Denis
6237e59c97
dev: use goprintffuncname, gomnd and rowserrcheck (#927)
Order linters in config in alphabetical order.
Support gomnd configuration.
2020-01-19 19:55:29 +03: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
Trevor Pounds
c1673d2277 Add zsh completion command.
Fixes #862
2019-12-30 10:15:31 -05:00
Trevor Pounds
60c55133a6 Fix import order. 2019-12-30 09:05:39 -05:00
Sascha Grunert
f3e349fb5c Propagate error when linter cannot be run
We now return an error if any linter is unable to run to
not exit on 0 in that case.

Closes #451

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-12-29 16:52:01 -05:00
Denis Isaev
2346cd8e56
fix json report Enabled field 2019-10-21 22:57:53 +03:00
Denis Isaev
df279922f6
just hide --deadline, don't deprecate 2019-10-15 20:46:12 +03:00
Daniel Caballero
98f60ebaa3 deadline is now deprecated, but should be taking its value from the configuration if set (#822)
* test that demostrates that deadline is not working if comes from the config

* overriding timeout with deadline when only deadline is different from its default value

* tests were not passing. default value for Deadline, that now only comes from config, is 0. Plus static check is going to fail because of deprecated cfg used

* golangci should use the latest golangci-lint version, that is the one deprecating deadline in favour of timeout

* README updated - looks the ci config in this project is used to generate usage instructions.. great!
2019-10-15 14:11:14 +03:00
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
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