chavacava
cf4901574e
refactor: replaces calls to astutils.PickNodes with calls to astutils.SeekNode when possible ( #1482 )
2025-08-23 17:41:10 +02:00
chavacava
92f28cb5e1
refactor: moves code related to AST from rule.utils into astutils package ( #1380 )
...
Modifications summary:
* Moves AST-related functions from rule/utils.go to astutils/ast_utils.go (+ modifies function calls)
* Renames some of these AST-related functions
* Avoids instantiating a printer config at each call to astutils.GoFmt
* Uses astutils.IsIdent and astutils.IsPkgDotName when possible
2025-05-26 13:18:38 +02:00
Oleksandr Redko
9f5f957b33
rule: allow lowercased and kebab-cased options ( #1272 )
...
* rule: tests for Configure with named options; fix errors
* rule: refactor and add tests for ifelse rules
* rule: allow lowercased and kebab-cased options
* test: update integration tests with lowercased params
* docs: update rules descriptions
* rule: simplify Configure implementation with one option
* gofmt and fix lint
* review: add isRuleOption, update grammar in doc, simplify regex
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com >
---------
Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com >
2025-03-28 09:34:20 +01:00
Oleksandr Redko
b04d5a71b6
refactor: return error instead of panic ( #1252 )
2025-02-26 22:27:31 +01:00
Oleksandr Redko
395f7902d3
refactor: replace failure Category raw string with constant ( #1196 )
...
* refactor: replace Category raw strings with constants
* Add type FailureCategory; add comments for constants
2025-01-18 12:16:19 +01:00
Denis Voytyuk
4b2c76e8b9
chore: cleanup code in rules ( #1197 )
2024-12-31 12:33:51 +01:00
ccoVeille
3d1115dacd
refactor: rule configuration and error management ( #1185 )
...
* refactor: avoid running rule once configuration failed
* refactor: remove deep-exit in lint/linter.go
2024-12-13 21:38:46 +01:00
Marcin Federowicz
9b15f3fcb6
refactor: replace panic with error in rules ( #1126 )
...
Co-authored-by: chavacava <salvadorcavadini+github@gmail.com >
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com >
2024-12-11 19:35:58 +01:00
chavacava
8f540123a1
refactor (rule/unused-receiver): replace AST walker by iteration over declarations ( #1171 )
2024-12-05 13:09:31 +01:00
Oleksandr Redko
09fb350a27
unused-param,unused-receiver: refactor configure func ( #1157 )
2024-12-04 05:55:19 +01:00
Oleksandr Redko
7f7d024f11
unused-param,unused-receiver: fix panic message ( #1156 )
2024-12-03 17:08:21 +01:00
Oleksandr Redko
d181862481
docs: fix rule descriptions ( #1147 )
2024-12-01 16:44:41 +01:00
Oleksandr Redko
3378f7033b
refactor: replace mutex with sync.Once for rule configuration ( #1118 )
2024-11-15 12:03:59 +01:00
Oleksandr Redko
be95bfa705
refactor: rename files to follow Go convention
2024-11-11 19:31:18 +01:00