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

8 Commits

Author SHA1 Message Date
Marcin Federowicz
70ceb1cbfb
cleanup: removes or names unused parameters and receivers to _ (#907) 2023-09-24 08:55:14 +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
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
chavacava
04728cf0de
Lint cleanup (#679) 2022-04-10 11:55:13 +02:00
mgechev
376425d517
refactor: remove URL field from the failure struct 2018-10-30 15:37:27 -07:00
SalvadorC
388baa3eeb Fix linter warnings (recommended config) in the code (#71) 2018-09-22 15:27:22 -07:00
chavacava
4e19174270 Fix issue19 (#20)
* Adds rule superfluous-else (an extension of indent-error-flow)

* Fix superfluous-else rule struct namming.

* Adds superfuous-else rule to the rules table

* fix issue 19
2018-06-13 07:01:31 -07:00
mgechev
8c53dad5ec
Rename and docs 2018-05-26 16:14:36 -07:00