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

1012 Commits

Author SHA1 Message Date
Michael McLoughlin
be35a880ab
unhandled-error: use full function name in error message (#962)
* update tests

* Update testdata/unhandled-error-w-ignorelist.go

* Update testdata/unhandled-error-w-ignorelist.go

---------

Co-authored-by: Denis Voytyuk <5462781+denisvmedia@users.noreply.github.com>
2024-01-08 09:36:30 -08:00
Denis Voytyuk
4b62e4b6e5
Update list of contributors (#960) 2024-01-08 10:00:05 +01:00
EXHades
e33fb872bb
fix: remove errored replace directive, fix go install (#957) 2024-01-04 11:23:21 +01:00
Denis Voytyuk
f8e122f43d
fix: add-constant struct tags in anonymous struct literals false positive (#954)
* fix: add-constant struct tags in anonymous struct literals false positive
2023-12-28 23:59:58 +01:00
Denis Voytyuk
8d5724f746
feat: add support for enforce-repeated-arg-type-style rule (#953) 2023-12-27 10:30:09 +01:00
renovate[bot]
90b21120ea
fix(deps): update module golang.org/x/tools to v0.16.1 (#949)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-13 00:34:38 +01:00
Oleksandr Redko
2a1701aadb
fix: enable tests in the test/utils.go file (#930) 2023-12-02 12:42:41 +01:00
Georgy Buranov
782f0f118c
variable to skip package name checks (#941)
* variable to skip package name checks

* add tests for skipPackageNameChecks

* Add documentation
2023-11-30 14:19:31 +01:00
renovate[bot]
d3aa99cf8b
chore(deps): update module github.com/spf13/afero to v1.11.0 (#945)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 15:50:12 +01:00
Bryan Boreham
7da6a39044
modifies-value-receiver: warn on slice or map (#943)
* modifies-value-receiver: warn on slice or map

Assignments which index into the slice or map are already ignored on
line 72, and those where the whole receiver is slice or map on line 50.
We should not ignore assignments where the member variable is slice
or map.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

* Remove extra space

---------

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>
Co-authored-by: Denis Voytyuk <5462781+denisvmedia@users.noreply.github.com>
2023-11-28 15:45:52 +01:00
renovate[bot]
2862d06d26
fix(deps): update module golang.org/x/tools to v0.16.0 (#944)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-28 00:20:17 -08:00
Marcin Federowicz
9e80d93545
extend parsing instructions to use json object instead of plain txt (#929) 2023-11-26 10:18:36 +01:00
Nahshon Unna Tsameret
9a2eab34f1
[dot-imports] support allow list of packages (#939)
Add the ability to allow list of packages to be dot imported.

Add a new don-imports configuration:
* `allowedPackages`: (string) comma-separated list of allowed dot import packages

Example:

```toml
[rule.dot-imports]
  arguments = [{ allowedPackages = "github.com/onsi/ginkgo/v2,github.com/onsi/gomega" }]
```
2023-11-26 10:07:12 +01:00
renovate[bot]
12dd587d41
fix(deps): update module github.com/fatih/color to v1.16.0 (#933)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-26 09:18:01 +01:00
Denis Voytyuk
07eb59669a
fix: ignore dot import aliases in import-alias-naming rule (#938) 2023-11-26 08:57:34 +01:00
renovate[bot]
cdc8caf36b
fix(deps): update module golang.org/x/tools to v0.15.0 (#935)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-16 16:37:14 -08:00
Oleksandr Redko
ccae54e04e
refactor: remove unused parameter from pick function (#932) 2023-11-06 11:01:38 +01:00
Oleksandr Redko
29ba247979
cli: refactor tests: use TestMain, t.Setenv (#931) 2023-11-02 17:07:46 +01:00
Eng Zer Jun
573f7153c1
var-naming: avoid allocations with (*regexp.Regexp).MatchString (#928) 2023-11-02 09:40:09 +01:00
Denis Voytyuk
fd9a130d7a
Add denyRegex support for import-alias-naming rule (#927) 2023-10-29 13:19:53 +01:00
WillAbides
cb72bd880d
formatters return output (#921)
Some of the formatters were writing directly to stdout instead of returning the output. That made them more difficult to use them with revivelib. This PR updates those formatters to write to a buffer and return the resulting string.
2023-10-29 08:05:08 +01:00
Marcin Federowicz
25ae73a67a
fix:ignore color marks when compare stings in test (#926) 2023-10-29 07:43:52 +01:00
Marcin Federowicz
bcae8c78ca
fix trailing whitespaces (#917) 2023-10-27 07:26:27 +02:00
Gavin Inglis
1ef3c0f554
refactor: remove refs to io/ioutil (#918)
Signed-off-by: ginglis13 <ginglis05@gmail.com>
2023-10-14 19:25:25 +02:00
renovate[bot]
8dbd58748a
fix(deps): update module golang.org/x/tools to v0.14.0 (#915)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-10-07 08:18:57 +02:00
Marcin Federowicz
cd2737acb4
Load config from different locations prefer XDG_CONFIG_HOME before HOME (#912) 2023-10-03 20:07:00 +02:00
y-yagi
d631844aeb
Fix link to the build (#911) 2023-10-03 11:27:00 +02:00
Marcin Federowicz
fb5bbe72e7
fix: literal calls case (#909) 2023-09-30 10:18:17 +02:00
Marcin Federowicz
cdb82683b1
cleanup rules descriptions (#908) 2023-09-25 06:51:12 +02:00
Marcin Federowicz
70ceb1cbfb
cleanup: removes or names unused parameters and receivers to _ (#907) 2023-09-24 08:55:14 +02:00
Marcin Federowicz
36c2ee2718
code cleanup: replace interface{} with any (#906) 2023-09-24 08:44:02 +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
Denis Voytyuk
50091409c0
feat: add support for enforce-slice-style rule (#900) 2023-09-23 09:05:52 +02:00
Ludovic Fernandez
5c69df7eb3
doc: fix examples (#899) 2023-09-19 09:03:56 +02:00
chavacava
93219dac49
updates checksums (#897) 2023-09-17 11:35:06 +02:00
Denis Voytyuk
356e667369
feat: add support for enforce-map-style rule (#895)
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2023-09-17 11:22:11 +02:00
chavacava
7dffe3ca48
quit config asap, remove unused pkg info (#896) 2023-09-17 11:10:49 +02:00
Dirk Faust
95acb880a1
Add unchecked-type-assertion (#889)
Co-authored-by: Dirk Faust <d.faust@mittwald.de>
2023-09-17 10:58:45 +02:00
renovate[bot]
3da2646e25
fix(deps): update module golang.org/x/tools to v0.13.0 (#887)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-09-15 15:11:34 +02:00
Denis Voytyuk
ca0678cd08
fix: dot-imports does not check test files (#884) 2023-08-30 08:06:58 +02:00
renovate[bot]
883c4cc199
fix(deps): update module github.com/chavacava/garif to v0.1.0 (#882)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-08-28 10:49:56 -07:00
Denis Voytyuk
f900b6c2d4
feat: add support for import-alias-naming rule (#881) 2023-08-28 15:26:00 +02:00
Oleksandr Redko
0357df7bc0
fix: add missing defer when unlocking mutex (#879) 2023-08-25 13:20:27 +02:00
mgechev
9a87e6fd82 Update goreleaser 2023-08-24 10:41:23 -07:00
Denis Voytyuk
a4ae369945
build: shift to the supported go versions (1.20 and 1.21) (#878) 2023-08-22 09:18:10 +02:00
Denis Voytyuk
4ee7542478
fix: false positive in import-shadowing for method names (#876) 2023-08-21 23:45:41 +02:00
chavacava
e758901c9a
Revert "fix: unnecesary alert for use-any when comments inside interface{} (#873)" (#874)
This reverts commit 519ffbdd7a.
2023-08-19 08:07:28 +02:00
chavacava
9acfcc8f86
fix #863:false positive on return statement in a func lit passed to the deferred function (#870) 2023-08-18 11:21:42 -07:00
Damián Ferencz
519ffbdd7a
fix: unnecesary alert for use-any when comments inside interface{} (#873)
* feat: add rule for unused import alias

* fix: rename rule

* fix: rename rule

* fix: use-any skip comments inside interface{}
2023-08-18 11:21:10 -07:00
Martins Irbe
19a95d9a7f
resolve #867: remove k[A-Z][A-Za-z\d]*$ sub-rule from var-naming (#871) 2023-08-16 13:23:29 +02:00