1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-30 08:57:07 +02:00
Commit Graph

1023 Commits

Author SHA1 Message Date
Markus Wiegand
842b3e2fa3
enhance Docker build process (#1070) 2024-10-24 12:56:51 -03:00
renovate[bot]
3780c36134
fix(deps): update module github.com/fatih/color to v1.18.0 (#1067)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-10-22 17:59:56 +02:00
Marcin Federowicz
501cc4a675
feat: ignore vendor if no exclude set (#1058) 2024-10-17 15:25:24 -07:00
renovate[bot]
cea28f882a
fix(deps): update module golang.org/x/tools to v0.26.0 (#1057) 2024-10-09 18:02:39 +02:00
Marcin Federowicz
d76ffb98f6
update testdata: var case (#1055) 2024-10-02 12:20:39 +02:00
Marcin Federowicz
ff7b0adb4c
rule.exported: add feature to disable checking on const,method,function, variable (#1047)
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2024-10-02 10:46:52 +02:00
chavacava
ca2a32b087
code cleanup (#1054) 2024-10-01 12:14:02 +02:00
chavacava
798ce21849
makes exported rule behave as golint (#1051)
Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-09-29 22:50:49 +02:00
chavacava
fa37c00bdf
removes redefinition of max built-in (#1052) 2024-09-29 10:08:15 +02:00
chavacava
e9b7f3aa68
bumps go version to 1.21.1 and update dependencies (#1050)
Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-09-28 18:02:46 +02:00
chavacava
4c3641ebc3
fix #1032 by comparing string representations of types (#1049) 2024-09-24 11:29:20 +02:00
Denis Voytyuk
3249a5ef06
fix: enforce-repeated-arg-type-style rule finds false positives in case of invalid types (#1046)
* fix: enforce-repeated-arg-type-style rule finds false positives in case of invalid types

* Fix oversight issue
2024-09-23 13:48:49 +02:00
chavacava
53a111d36e
adds check for receiver names length (#1048)
Co-authored-by: chavacava <salvador.cavadini@gmail.com>
Co-authored-by: yuta nishiyama <57400690+ytnsym@users.noreply.github.com>
2024-09-23 12:38:39 +02:00
chavacava
a65fb8d1b5
adds tests for specific go versions (#1043)
Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-09-20 16:09:24 +02:00
yuta nishiyama
4ac5cb5e39
fix gitignore (#1042) 2024-09-19 08:11:04 +02:00
Oleksandr Redko
59131927d3
Move away from deprecated github.com/pkg/errors (#1039) 2024-09-16 09:40:46 +02:00
yuta nishiyama
6b745b0075
fix lint issues (#1038) 2024-09-16 09:32:34 +02:00
Oleksandr Redko
259f22ea3f
docs: update Go wiki links (#1036) 2024-09-14 21:38:45 +02:00
Oleksandr Redko
8bea739f45
docs: fix typo in comments (#1037) 2024-09-14 21:38:06 +02:00
chavacava
6a139caf92
fix #1029 (#1030) 2024-08-21 10:38: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
05c4801f9b
check param, result, type param of function in redefines-builtin-id rule (#1023)
* check param, result, type param of function in redefines-builtin-id rule

* combine the if statements

* tiny refactoring to make it more Go idiomatic

---------

Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2024-08-15 13:29:11 +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
Trifun
a638ed6e24
Add multiple scopes support to string-format rule (#1009)
* Add multiple scopes support to string-format rule

* Add new parsing rule

* Fix example
2024-08-09 21:01:17 +02:00
renovate[bot]
24a70cdf18
fix(deps): update module golang.org/x/tools to v0.24.0 (#1019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-08-09 20:55:14 +02:00
Fagim Sadykov
8f9edc9fe7
#1002 - add "checkPublicInterface" option to "exported" rule to allow check documentation on public methods on public interfaces (#1003)
* [var-naming] handle private uppercased const

* FEATURE #1002 - "checkPublicInterface" option for "exported" rule - to check public interface method comments

* fix exported #1002 for ast.Ident

* fix exported #1002 for ast.Ident 2

* go fmt applyed

* #1002 update documentation on `exported` rule

* refactor `exported` rule configuration logic

* test and review fixes

---------

Co-authored-by: fregin <freginpanklinshtern@gmail.com>
2024-07-30 10:36:03 +02:00
Amin Cheloh
a0fcd5a3c5
docs: typo in add-constant configuration (#1018) 2024-07-30 10:34:54 +02:00
Ludovic Fernandez
1b9010aff0
docs: fix TOC item (#1017) 2024-07-29 10:59:31 +02:00
Denis Voytyuk
9ec5e553e9
Update goreleaser version to 1.22 (#1016) 2024-07-24 07:24:35 +02:00
Denis Voytyuk
0eb2e24523
Drop go 1.20, add go 1.22 in GH actions (#1015)
* Drop 1.20 test version, add 1.22
* Update go.sum
2024-07-24 07:19:53 +02:00
Denis Voytyuk
bedce659ca
Fix goreleaser (#1014) 2024-07-24 07:16:11 +02:00
Songlin Yang
7ef710a0c2
fix(1007): return Sel.Name as FuncName when selector is an CallExpr (#1012)
Signed-off-by: lsytj0413 <511121939@qq.com>
2024-07-19 10:33:27 +02:00
renovate[bot]
a2174a34b3
fix(deps): update module golang.org/x/tools to v0.23.0 (#1006)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-07-13 13:34:38 +02:00
Arash Hatami
bf7adb69ad
Update README.md & Typo (#1010)
* docs: update README.md

- Fix the Docker image version
- Syntax and grammer

* fix: typo for minimum
2024-07-11 09:56:42 +02:00
Kostas Stamatakis
689291fbcb
rule optimize-operands-order: do not consider built-in len as a caller (#1005) 2024-07-02 08:22:13 +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
Ludovic Fernandez
9c2d25c919
docs: clean (#996) 2024-06-22 16:54:34 +02:00
renovate[bot]
8fe6c0666e
fix(deps): update module golang.org/x/tools to v0.22.0 (#999)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-06-22 16:53:45 +02:00
Ludovic Fernandez
1bb03d77c2
docs: missing item and homogeneous style (#994) 2024-06-03 05:45:16 +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
renovate[bot]
bbe5eb7414
fix(deps): update module github.com/burntsushi/toml to v1.4.0 (#992)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-23 19:06:06 +02:00
renovate[bot]
f4d39494f0
fix(deps): update module github.com/fatih/color to v1.17.0 (#990)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-13 15:08:23 -07:00
chavacava
5bf08fcd40
Fix 922 (#989)
* removes spurious warning on package comments starting with spaces

* skips directive comments when linting package comments

---------

Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-05-13 14:23:02 +02:00
Entuazism
993c9f68a9
fix #982 2024-05-11 19:50:30 +02:00
chavacava
2d3426f777
more precise regular expression for directive comments (#988)
Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-05-11 19:19:09 +02:00
chavacava
85333f8533
Fix #808 (#986)
fix #808 by using the official regexp for directives
---------

Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-05-10 12:11:05 +02:00
renovate[bot]
582822e60a
fix(deps): update module golang.org/x/tools to v0.21.0 (#984)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-07 07:08:20 +02:00
chavacava
9b297848d9
adds comments-density rule (#979) 2024-04-20 10:20:56 +02:00
Gustavo Alves
0a77458f89
remove colon suffix in comment-spacings rule (#981) 2024-04-19 16:39:59 +02:00