Oleksandr Redko
0afba4ff15
refactor: enforce map and slice style ( #1131 )
2024-11-16 18:05:30 +01:00
Oleksandr Redko
74e2417f7d
fix: revive hangs on Windows if go.mod is not found
2024-11-15 09:37:53 +01:00
Oleksandr Redko
4c958ef739
refactor: remove redundant defer
2024-11-12 09:26:30 +01:00
centralab
c0d4d07ab6
fix: nil panic on old go.mod (issue #1100 )
2024-11-11 18:50:12 +01:00
Oleksandr Redko
9a8587cc49
revive: add revive.toml for linting revive itself ( #1094 )
2024-11-04 09:18:17 -03:00
Oleksandr Redko
14babf2824
refactor: move lint.Name to name.go file ( #1084 )
2024-10-28 13:22:36 +01:00
Oleksandr Redko
d29323985f
refactor: add tests for isGenerated in the lint package ( #1083 )
2024-10-28 08:24:10 -03:00
Oleksandr Redko
599874c773
chore: remove unnecessary empty lines ( #1080 )
2024-10-26 07:35:02 -03:00
Oleksandr Redko
662e02cd70
refactor: use "filepath" instead of "path" ( #1073 )
2024-10-25 11:48:41 +02:00
yuta nishiyama
6b745b0075
fix lint issues ( #1038 )
2024-09-16 09:32:34 +02:00
chavacava
251470be6a
use a default Go version (1.0) in absence of go.mod ( #1028 )
2024-08-18 19:21:50 +02:00
chavacava
56702bd8d7
extract go version without depending on go list ( #1025 )
...
* extract go version without depending on go list
---------
Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-08-18 09:53:45 +02:00
Shoichi Kaji
e54773e4b9
check clear/max/min in redefines-builtin-id rule on go1.21+ ( #1024 )
...
* check clear/max/min in redefines-builtin-id rule on go1.21+
* Update rule/redefines-builtin-id.go
Co-authored-by: Denis Voytyuk <5462781+denisvmedia@users.noreply.github.com>
---------
Co-authored-by: Denis Voytyuk <5462781+denisvmedia@users.noreply.github.com>
2024-08-15 13:14:16 +02:00
dominiquelefevre
0df1bb0860
Fix a performance regression #995 ( #998 )
...
* Support go workspaces when detecting the go version.
When a module is part of a workspace, a call to `go list -m` lists all
modules in the workspace, and we need to parse multiple modinfos.
* Do not invoke `go list` for every package.
* Add a go language version override config option for golangci-lint.
2024-06-22 17:12:49 +02:00
dominiquelefevre
4242f24f4d
Add support for the new implementation of for loop variables in go 1.22. ( #993 )
...
* Add support for the new behaviour of for loops in go 1.22.
Go 1.22 has changed the behaviour of for loops. Every iteration
makes new loop variables. It is now safe to take their addresses
because they are guaranteed to be unique. Similarly, it is now
safe to capture loop variables in functions.
* adds documentation for public function
---------
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2024-06-02 11:55:26 +02:00
Vincent Baron
64dda06595
feat: capitalise var naming to IDs ( #964 )
...
* feat: capitalise var naming to IDs
* feat: added test case for IDs case
2024-01-17 14:01:40 +01:00
Marcin Federowicz
9abe06adfa
refactor: rename blacklist to blocklist and whitelist to allowlist ( #946 )
...
* refactor: rename blacklist to blocklist and whitelist to allowlist
2024-01-15 12:16:00 +01:00
Marcin Federowicz
cd2737acb4
Load config from different locations prefer XDG_CONFIG_HOME before HOME ( #912 )
2023-10-03 20:07:00 +02:00
chavacava
5ccebe86c2
Code cleaunp ( #905 )
...
* fix minor lint issue
* fix package comments
* fix comments
* removes extra empty lines
* fix import alias name
2023-09-23 10:41:34 +02:00
Fagim Sadykov
310d1d76e4
per-rule file exclude filters ( #850 ) ( #857 )
2023-08-12 08:21:11 +02:00
Minko Gechev
71ef7fdcb9
Move to the default importer from gcexportdata ( #723 )
2022-08-06 09:42:15 +02:00
okhowang
387d7276a1
Make package comment more confident ( #694 )
2022-06-19 13:21:31 +02:00
Ivan Trubach
dc30eb1182
fix(receiver-naming): distinguish types with parameters ( #692 )
...
* fix(receiver-naming): distinguish types with parameters
* chore: run tests using supported Go versions matrix
2022-06-18 18:47:53 +02:00
chavacava
04728cf0de
Lint cleanup ( #679 )
2022-04-10 11:55:13 +02:00
chavacava
31fbdb1833
Fix/677 ( #678 )
2022-04-10 09:06:59 +02:00
subham sarkar
577441d60c
format sources w/ gofumpt ( #643 )
...
Signed-off-by: subham sarkar <sarkar.subhams2@gmail.com>
2022-03-02 08:24:55 +01:00
chavacava
e0fa03a13a
Max open files ( #628 )
...
* adds max_open_files flag
* adds doc of max_open_files flag
* amends commmit
2022-02-07 17:36:03 -08:00
doniacld
9c30b4479c
Run revive over a invalid go source file ( #364 ) ( #598 )
2021-10-17 19:58:29 +02:00
doniacld
be81121399
Add banned characters rule ( #532 ) ( #591 )
2021-10-14 20:56:29 +02:00
sina safari
0bcc996acf
fixed some complex code ( #580 )
2021-09-26 08:28:58 +02:00
SalvadorC
89f108c22a
fix issue #540 ( #543 )
2021-07-11 21:31:46 -07:00
SalvadorC
b298ffe4ee
Adds configuration option to enable all available rules ( #521 )
...
Adds configuration option to enable all available rules
2021-05-21 09:53:10 +02:00
SalvadorC
93b26c7949
adds "exclude" knob in configuration ( #505 )
2021-03-20 15:43:44 -07:00
SalvadorC
55cfae63e9
Conf reason rule disabling ( #193 )
...
* adds support for comments when enabling/disabling
* adds config flag to require disabling reason
* Update lint/file.go
adds code fmt suggestion by @mgechev
Co-Authored-By: Minko Gechev <mgechev@gmail.com>
* moves regexp compilation out of the function
fix typo in condition
* adds support for comments when enabling/disabling
* skips incomplete directives and generate a failure
* adds _directive_ concept to cope with specify-disable-reason
* adds doc
gofmt
* fixes severity is ignored
2019-08-02 08:21:33 -07:00
SalvadorC
202adf0786
Fix 102 ( #103 )
...
Do not require additional newline for disabling multiple rules
2019-01-24 09:14:43 -08:00
SalvadorC
c878d3090d
fixes issue #98 ( #99 )
2019-01-18 07:33:40 -08:00
mgechev
376425d517
refactor: remove URL field from the failure struct
2018-10-30 15:37:27 -07:00
Genadi Samokovarov
d2e0e5a0ed
Introduce the empty-lines rule that verifies there are no {head,trail}ing lines ( #81 )
2018-10-11 14:52:46 -07:00
SalvadorC
bd4139713d
fix issue [ #59 ] ( #70 )
2018-09-21 10:51:01 -07:00
mgechev
90f51530cc
Add white & black lists for var-naming
...
This PR introduces a white & black lists of initialisms for the
`var-naming` rule.
Now the rule can be configured with:
```toml
[rule.var-naming]
arguments = [["ID"], ["VM", "BAR"]]
```
This way, the linter will ignore `customId` but will throw on `customVm` or `customBar`.
Fix #41
2018-09-15 15:05:31 -07:00
mgechev
1686f0b237
Introduce optional type checking
...
Enable optional type checking.
2018-05-31 21:43:02 -07:00
mgechev
64636caedd
Fix package level type checking
2018-05-31 19:49:39 -07:00
mgechev
b096ed5ec3
Refactoring
2018-02-03 19:37:38 -08:00
mgechev
31b194f9bf
Update the error code handling
2018-02-03 19:33:14 -08:00
mgechev
deb72d6238
Add default formatter
2018-01-27 17:01:18 -08:00
mgechev
1870854374
Improvements
2018-01-27 16:37:30 -08:00
mgechev
8746067321
Implement command line arguments
2018-01-27 16:22:17 -08:00
mgechev
5ec3daa762
API improvements
2018-01-26 20:45:17 -08:00
mgechev
3540aca153
Remove useless tags
2018-01-26 20:27:52 -08:00
mgechev
9f437c09a5
Basic configuration
2018-01-26 20:20:49 -08:00