Oleksandr Redko
d81fc8fab3
refactor: reduce control nesting in AddConstantRule.configure ( #1128 )
2024-11-18 14:38:56 +01:00
Oleksandr Redko
0afba4ff15
refactor: enforce map and slice style ( #1131 )
2024-11-16 18:05:30 +01:00
chavacava
7ee4500e12
fix: fixes #1103 by fixing the processing of max-public-structs arguments ( #1114 )
2024-11-15 09:43:53 +01:00
Oleksandr Redko
be95bfa705
refactor: rename files to follow Go convention
2024-11-11 19:31:18 +01:00
centralab
c0d4d07ab6
fix: nil panic on old go.mod (issue #1100 )
2024-11-11 18:50:12 +01:00
Oleksandr Redko
6228ba57cf
refactor: simplify tests ( #1089 )
2024-11-04 09:25:03 -03:00
chavacava
7c068a7dde
fix duplicated findings for string-format when there is more than one… ( #1085 )
2024-11-04 09:19:29 -03:00
Oleksandr Redko
9a8587cc49
revive: add revive.toml for linting revive itself ( #1094 )
2024-11-04 09:18:17 -03:00
chavacava
eb18252088
adds filename-format rule ( #1092 )
2024-11-02 14:23:46 -03:00
Oleksandr Redko
511e4e65ff
fix: extractInstructionFromJSON returns an error ( #1082 )
2024-10-29 13:33:38 +01:00
Oleksandr Redko
7c29b560c3
refactor: fix typo in the field name of TestFileFilterRule ( #1086 )
2024-10-29 13:33:18 +01: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
3bead6f4a0
feat: add file-length-limit
rule ( #1072 )
2024-10-26 07:40:24 -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
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
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
Oleksandr Redko
59131927d3
Move away from deprecated github.com/pkg/errors ( #1039 )
2024-09-16 09:40:46 +02:00
Oleksandr Redko
8bea739f45
docs: fix typo in comments ( #1037 )
2024-09-14 21:38:06 +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
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
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
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
Jameel Al-Aziz
17a0393326
enforce-slice-style: Support nil declaration enforcement ( #974 )
...
* enforce-slice-style: Support nil declaration enforcement
Add support for enforcing nil slice declarations as recommended by both
the Go Code Review and Uber style guides.
This initial version is quite strict in that it also prevents using
empty literal and make-style slices in struct assignments and as
function arguments.
* Add more tests
* docs
2024-02-26 11:58:31 +01:00
chavacava
ef34f92cef
fix 968 by removing references to black and white lists ( #969 )
2024-02-03 18:36:44 +01:00
chavacava
3a62091839
Adds rule max-control-nesting
( #967 )
2024-01-28 12:22:41 +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
Denis Voytyuk
8d5724f746
feat: add support for enforce-repeated-arg-type-style rule ( #953 )
2023-12-27 10:30:09 +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
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
Denis Voytyuk
fd9a130d7a
Add denyRegex support for import-alias-naming rule ( #927 )
2023-10-29 13:19:53 +01: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
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
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
Denis Voytyuk
f900b6c2d4
feat: add support for import-alias-naming rule ( #881 )
2023-08-28 15:26:00 +02:00
Fagim Sadykov
310d1d76e4
per-rule file exclude filters ( #850 ) ( #857 )
2023-08-12 08:21:11 +02:00
Fagim Sadykov
b31eb18b1f
adds [allowRegex] parameter for unused-parameter
and unused-receiver
rules ( #858 )
2023-08-11 07:35:08 +02:00
Fagim Sadykov
8941d19026
imporve var-naming
- add upperCaseConst option to allow UPPER_CASED constants #851 ( #852 )
...
* imporve `var-naming` - add upperCaseConst option to allow UPPER_CASED constants #851
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com>
2023-07-31 09:09:38 +02:00
Damián Ferencz
7bd666898c
feat: add rule for redundant import alias ( #854 )
2023-07-31 08:22:40 +02:00
Ricardo Martin Marcucci
a155d92342
fix: support method call from structures for string-format ( #840 )
...
* fix: support method call from structures for string-format
* fix: added test for MR
2023-07-29 11:27:07 +02:00
Miles Delahunty
ae07914dc4
ifelse: option to preserve variable scope ( #832 )
...
* ifelse: option to preserve variable scope
2023-05-23 10:10:09 +02:00
Minko Gechev
6d5bc51b50
Move away from deprecated ioutils ( #825 )
...
Fix #806
2023-05-16 08:06:52 +02:00
chavacava
6fd2c76c7d
fix issue #520 ( #802 )
2023-03-14 16:16:12 -07:00