1
0
mirror of https://github.com/mgechev/revive.git synced 2025-03-17 20:57:58 +02:00
revive/testdata
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
..
2022-04-18 09:45:42 -07:00
2020-06-08 09:40:38 -07:00
2020-06-08 09:40:38 -07:00
2021-07-11 21:31:46 -07:00
2021-08-26 08:36:24 -07:00
2021-08-26 08:36:24 -07:00
2021-08-26 08:36:24 -07:00
2021-06-29 13:04:51 -07:00
2021-06-29 21:40:40 +02:00
2023-05-16 10:31:25 +02:00
2022-02-15 22:46:24 +01:00
2023-02-18 10:57:06 +01:00
2021-10-01 13:55:53 +02:00
2022-03-29 11:25:38 -07:00
2021-08-16 12:15:17 +02:00