1
0
mirror of https://github.com/mgechev/revive.git synced 2024-12-12 10:44:59 +02:00
Commit Graph

7 Commits

Author SHA1 Message Date
chavacava
24a9325b5a
fix: ast_utils.FuncSignatureIs panics with types names other than ast.Ident (#1174) 2024-12-07 15:40:39 +01:00
chavacava
06192a5599
refactor: remove lint issues (#1176) 2024-12-07 14:43:25 +01:00
Denis Voytyuk
cb74ccbf44
chore: Improve sortables detection (#1151)
Co-authored-by: chavacava <salvador.cavadini@gmail.com>
2024-12-02 13:02:39 +01:00
Miles Delahunty
7e1d35d8d2
feat: optional extension to early-return rule (#1133) (#1138) 2024-11-28 08:51:33 +01: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
Miles Delahunty
4bb48df5d2
refactor: extract shared code for linting if-else chains (#821)
* refactor: extract shared code for linting if-else chains

The rules "early-return", "indent-error-flow" and
"superfluous-else" have a similar structure. This
moves the common logic for classifying if-else chains
to a common package.

A few side benefits:
- "early-return" now handles os.Exit/log.Panicf/etc
- "superfluous-else" now handles (builtin) panic
- "superfluous-else" and "indent-error-flow" now handle if/else
  chains with 2+ "if" branches

* internal/ifelse: style fixes, renames, spelling
2023-05-17 13:51:35 +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