1
0
mirror of https://github.com/mgechev/revive.git synced 2025-11-23 22:04:49 +02:00
Commit Graph

1284 Commits

Author SHA1 Message Date
chavacava
14c91fed1d feature: struct-tag warns on (useless) options on ignored fields (#1487) 2025-08-24 07:17:09 +02:00
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
ccf85a25e5 fix: default formatter generates an extra new line (#1485) 2025-08-17 11:31:20 +02:00
chavacava
9fd8adbcd0 feature: detect useless options in spanner struct tag (#1483) 2025-08-17 07:50:54 +02:00
Baranov Victor
15aded98f6 feature: new rule package-directory-mismatch (#1429) 2025-08-16 19:16:20 +02:00
Sarthak S. Waghmare
f07a47a1bf feature: support spanner struct tag in struct-tag rule (#1479) 2025-08-15 21:30:40 +02:00
chavacava
9d600b6df1 refactor: reduces the number of references to deprecated *ast.Object (#1473) 2025-08-14 04:25:47 -07:00
Oleksandr Redko
b34c8e96ec refactor: fix musttag lint issues (#1464) 2025-08-11 01:43:23 -07:00
Oleksandr Redko
e5f7980ca3 chore: run tests and lint on push to main branch (#1470) 2025-08-08 04:08:20 -07:00
Baranov Victor
74e4f6318d chore: add macOS test runner (#1465) 2025-08-08 03:55:52 -07:00
renovate[bot]
74bbe3b1a6 fix(deps): update module golang.org/x/tools to v0.36.0 (#1469) 2025-08-08 08:30:54 +02:00
renovate[bot]
da506562bb fix(deps): update module golang.org/x/mod to v0.27.0 (#1468)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-07 22:32:08 +02:00
renovate[bot]
3148906153 chore(deps): update module golang.org/x/sys to v0.35.0 (#1466)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-07 22:30:55 +02:00
renovate[bot]
22dfd66375 chore(deps): update module golang.org/x/text to v0.28.0 (#1467)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-08-07 22:29:05 +02:00
chavacava
84b565b0bf feature: new rule useless-fallthrough (#1462) 2025-08-07 14:18:58 +02:00
chavacava
47205455ea feature: new rules identical-switch-branches and identical-ifelseif-branches
These new rules result from the refactoring of `identical-branches` that will cover only simple/single if..else statements.
2025-08-06 11:19:12 +02:00
chavacava
f353e4b0e5 feature: new rule identical-ifelseif-conditions (#1454) 2025-08-04 06:58:14 +02:00
chavacava
12d96adfd4 feature: new rule enforce-else (#1436) 2025-08-04 06:43:36 +02:00
chavacava
3f4591cd9a feature: new rule identical-switch-conditions (#1451) 2025-08-02 08:04:18 +02:00
chavacava
68ac5514f5 feature: detect identical-branches in switch statements (#1448) 2025-07-30 15:55:03 +02:00
chavacava
9fc7dc7d77 feature: identical-branches: check branches of "if ... else if" chains (#1440) 2025-07-29 16:57:06 +02:00
chavacava
6b060cd03a fix(1438): enforce-switch-style - false positive with pure return based switch (#1446) 2025-07-28 21:30:13 +02:00
Oleksandr Redko
5a1e5fda4c chore: Add Copilot instructions (#1437)
* chore: Add Copilot instructions

* Update .github/copilot-instructions.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update DEVELOPING

* move to instructions

* update DEVELOPING

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-25 12:11:08 +02:00
Baranov Victor
b969b8be4a modifies-parameter: handle slices.Delete and slices.DeleteFunc (#1427) 2025-07-22 04:21:34 -07:00
ccoVeille
40a690dff5 exported: improve detection and error message (#1403) 2025-07-22 01:47:37 -07:00
Oleksandr Redko
7de7cf3076 docs: add DeepWiki link to README (#1432) 2025-07-22 01:45:40 -07:00
ccoVeille
984b38e246 chore: improve error reporting in test suite (#1431) 2025-07-21 02:21:37 -07:00
Oleksandr Redko
c971cb750b chore: improve comments for config files (#1424) 2025-07-12 19:44:39 +02:00
Oleksandr Redko
a15fdfd322 chore: clean up GoReleaser config, remove unnecessary hooks (#1422) 2025-07-12 07:33:28 -07:00
Oleksandr Redko
809768cffe chore: enable formatters in golangci-lint config (#1421) 2025-07-12 07:32:39 -07:00
renovate[bot]
92243279ea fix(deps): update module golang.org/x/tools to v0.35.0 (#1423)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
v1.11.0
2025-07-12 00:19:24 -07:00
Asaf Krenzler
cc180e221e var-naming: option to skip initialism name checks (#1415)
Co-authored-by: akrenzler <akrenzler@paloaltonetworks@com>
Co-authored-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
2025-07-11 04:45:38 -07:00
Oleksandr Redko
594e56503b chore: update golangci-lint; enable a few revive rules (#1420)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-11 04:19:23 -07:00
renovate[bot]
772659ea1d fix(deps): update module golang.org/x/mod to v0.26.0 (#1419)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 09:25:43 +02:00
renovate[bot]
8d3b01013b chore(deps): update module golang.org/x/text to v0.27.0 (#1418)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 09:24:39 +02:00
renovate[bot]
8e0de86d83 fix(deps): update module golang.org/x/sync to v0.16.0 (#1417)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 09:19:26 +02:00
renovate[bot]
e585c9be3a chore(deps): update module golang.org/x/sys to v0.34.0 (#1416)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-07-10 09:18:35 +02:00
Ville Skyttä
47b44556d9 docs: improve unhandled-error ignore argument examples (#1412) 2025-07-08 03:25:19 -07:00
Oleksandr Redko
03e81029a8 docs: improve Installation section (#1409) 2025-06-25 06:29:58 -07:00
Oleksandr Redko
77d0d4a54b early-return: detect short deviated statements (#1396) 2025-06-25 13:51:18 +02:00
Oleksandr Redko
456cbd0aa8 var-naming: handle possible panic (#1405)
* var-naming: handle possible panic

* Update rule/var_naming.go

Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>

* fix test

* update error message

---------

Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com>
2025-06-20 13:03:56 +02:00
Ludovic Fernandez
87bd73b28e unexported-return: fix type aliases support (#1408) 2025-06-18 07:58:16 -07:00
Ludovic Fernandez
24c008dd00 fix: var-naming rule extraBadPackageNames type (#1404) 2025-06-16 13:04:53 -07:00
Oleksandr Redko
04983a692f exported: ignore exported symbols from the main package (#1398) 2025-06-16 14:23:47 +02:00
renovate[bot]
426a27ac0d fix(deps): update module golang.org/x/tools to v0.34.0 (#1402)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-06 02:13:36 -07:00
ccoVeille
e515d11480 unexported_return: exclude main package and test and tests files (#1399)
The content of these files cannot be imported by other packages,
so they are excluded from the unexported_return rule.
2025-06-06 09:48:30 +02:00
renovate[bot]
a538e521c8 chore(deps): update module golang.org/x/text to v0.26.0 (#1400)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-06-05 09:50:32 -07:00
chavacava
cfd69439bb feature: new rule enforce-switch-default (#1390) 2025-06-01 09:57:47 +02:00
chavacava
6becd540e4 feature: new rule use-fmt-print (#1389)
print and println built-in functions are not recommended for use-cases other than language boostraping and are not guaranteed to stay in the language.

This commit adds a new rule, use-fmt-print, that spots uses of print and println, and recommends using their fmt equivalents.
v1.10.0
2025-05-28 12:57:37 +02:00
chavacava
a260ed9034 refactor: simplifies the implementation of rule call-to-gc (#1388) 2025-05-27 18:08:33 +02:00