1
0
mirror of https://github.com/mgechev/revive.git synced 2024-11-24 08:32:22 +02:00
revive/testdata/golint
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
..
blank-import-lib.go Ignore blank import of embed if embed is actually used in the file (#501) 2021-03-06 14:04:57 +01:00
blank-import-with-embed.go Ignore blank import of embed if embed is actually used in the file (#501) 2021-03-06 14:04:57 +01:00
const-block.go fix issue #691 (#700) 2022-06-28 18:14:26 +03:00
context-keys-type.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
docs_test.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
error-naming.go fix issue #691 (#700) 2022-06-28 18:14:26 +03:00
error-return.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
error-strings-pkg-errors.go Update error-strings rule (#608) (#609) 2021-10-28 21:26:02 +02:00
error-strings.go Fix package check in error-strings rule (#610) (#611) 2021-10-30 08:45:37 +02:00
errorf.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
exported.go Exported config (#565) 2021-08-26 08:36:24 -07:00
import-dot.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
increment-decrement.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
indent-error-flow.go refactor: extract shared code for linting if-else chains (#821) 2023-05-17 13:51:35 +02:00
package-doc1.go Make package comment more confident (#694) 2022-06-19 13:21:31 +02:00
package-doc2.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc3.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc4.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-doc5.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
package-main.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
pkg-caps.go add golint's package name MixedCaps rule as in 83fdc39ff7/lint.go (L561-L563) (#797) 2023-02-27 19:56:30 +01:00
range.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
receiver-naming.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
sort.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
stutter.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
time-naming.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
unexported-return.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
value-spec.go fix issue #691 (#700) 2022-06-28 18:14:26 +03:00
var-declaration.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00
var-naming.go renames fixtures as testdata to avoid spurious dependencies (#359) 2020-03-02 09:12:43 -10:00