Skip to content

Releases: mgechev/revive

v1.6.0

23 Jan 21:27
d9c61c1
Compare
Choose a tag to compare

Changelog

  • 275b018 refactor (rule/error-return): replace AST walker by iteration over declarations (#1163)
  • fcfd6ad refactor (rule/flag-param): replace AST walker by iteration over declarations (#1164)
  • a31d5af refactor (rule/modifies-value-receiver): replace AST walker by iteration over declarations (#1165)
  • dff4dc9 Filename-format rule: fix filename extension regex: ".go" to "\.go". (#1132)
  • 655e606 Update RULES_DESCRIPTIONS.md (#1134)
  • 7d97f54 [chore] clean up go.sum (#1201)
  • d2778f3 adds rule use-errors-new (#1142)
  • cb74ccb chore: Improve sortables detection (#1151)
  • 72b91f0 chore: Update go.sum (#1153)
  • dde8344 chore: add missing tests for var-declarations, fix any/interface{} type issue (#1154)
  • 4b2c76e chore: cleanup code in rules (#1197)
  • 4dd63ef chore: fix typo (#1187)
  • 45731a3 chore: migrate goreleaser config to v2 (#1105)
  • 10d9697 chore: remove unused #region comments (#1181)
  • d64bddc chore: use US English instead of UK English (#1186)
  • bb9e681 cognitive-complexity: handle direct recursion (#1149)
  • 3bc2404 deep-exit: fix mixed receiver type (lintDeepExit) (#1150)
  • a48710b deep-exit: ignore testable examples (#1155)
  • 7f769f8 feat: add redundant-build-tag rule (#1135)
  • 7e1d35d feat: optional extension to early-return rule (#1133) (#1138)
  • 57fe5b6 fix(deps): update module github.com/spf13/afero to v1.12.0 (#1200)
  • 47dc923 fix(deps): update module golang.org/x/tools to v0.28.0 (#1172)
  • 4ba2c56 fix(deps): update module golang.org/x/tools to v0.29.0 (#1198)
  • a106e63 fix(rule/modifies-value-receiver): miss modification by ++/-- (#1175)
  • 24a9325 fix: ast_utils.FuncSignatureIs panics with types names other than ast.Ident (#1174)
  • 772285d fix: change URL to the page with rules descriptions (#1129)
  • 98a6c97 fix: confusing-results doesn't work with pointer types (#1158)
  • 7998011 fix: return configure rule error (#1193)
  • d9c61c1 fix: running revive in CI (#1205)
  • c3b541f refactor (rule/arguments-limits): replace AST walker by iteration over declarations (#1159)
  • 4b13782 refactor (rule/cyclomatic): replace AST walker by iteration over declarations (#1161)
  • cb89a4c refactor (rule/datarace): replace AST walker by iteration over declarations (#1162)
  • 361c744 refactor (rule/function-length): replace AST walker by iteration over declarations (#1166)
  • a31d590 refactor (rule/function-result-limit): replace AST walker by iteration over declarations (#1167)
  • 3e1dbc0 refactor (rule/get-return): replace AST walker by iteration over declarations (#1168)
  • 5c2aadf refactor (rule/receiver-naming): replace AST walker by iteration over declarations (#1169)
  • 278246d refactor (rule/unexported-return): replace AST walker by iteration over declarations (#1170)
  • 8f54012 refactor (rule/unused-receiver): replace AST walker by iteration over declarations (#1171)
  • 9a5c95f refactor(rule/context-as-argument): replace AST walker by iteration over declarations (#1160)
  • f94c9d7 refactor: add all wait group delta at once when possible (#1179)
  • 777abc9 refactor: avoid duplicated exitFunctions map (#1145)
  • f6a3820 refactor: code cleanup (#1177)
  • 0afba4f refactor: enforce map and slice style (#1131)
  • 93c6bc8 refactor: extract getVersion function (#1127)
  • 77616f0 refactor: fix 'use-any' revive issues (#1204)
  • 3421eae refactor: fix linting issues (#1188)
  • 4ca2c11 refactor: get rid of mitchellh/go-homedir package (#1195)
  • e23fcdb refactor: modifies linting machinery to use Failure as a mean to signal erros in rules application (#1178)
  • 0e8acea refactor: move functions out from utils.go (#1139)
  • d81fc8f refactor: reduce control nesting in AddConstantRule.configure (#1128)
  • 06192a5 refactor: remove lint issues (#1176)
  • 660968f refactor: remove redundant fmt.Fprintln calls (#1130)
  • 303ae4a refactor: remove useless failure slice declaration (#1141)
  • 395f790 refactor: replace failure Category raw string with constant (#1196)
  • 9b15f3f refactor: replace panic with error in rules (#1126)
  • 3d1115d refactor: rule configuration and error management (#1185)
  • 78e927d refactor: simplify by using switch instead of if (#1190)
  • cadb2dd refactor: simplify config.GetFormatter; add tests (#1184)
  • 1425e2f refactor: simplify with strings.Prefix, strings.CutPrefix (#1137)
  • 7cbd3d1 refactor: use slices.SortFunc instead of sort.Slice (#1191)
  • 1b4440c refactor: use toml.Unmarshal instead of toml.Decode (#1122)
  • 213d960 rename unused parameter (#1143)
  • 7f7d024 unused-param,unused-receiver: fix panic message (#1156)
  • 09fb350 unused-param,unused-receiver: refactor configure func (#1157)
  • 1117372 update doc (#1203)

v1.5.1

16 Nov 10:45
3378f70
Compare
Choose a tag to compare

Changelog

  • cc3ad5f fix #1066 by ignoring what seems legit modification of value receivers
  • 1070fcd fix(deps): update module golang.org/x/mod to v0.22.0 (#1099)
  • a4d0c43 fix(deps): update module golang.org/x/tools to v0.27.0 (#1102)
  • ce69652 fix: cli tests on Windows; add tests-on-windows workflow
  • 7ee4500 fix: fixes #1103 by fixing the processing of max-public-structs arguments (#1114)
  • c0d4d07 fix: nil panic on old go.mod (issue #1100)
  • 74e2417 fix: revive hangs on Windows if go.mod is not found
  • 4c958ef refactor: remove redundant defer
  • be95bfa refactor: rename files to follow Go convention
  • 3378f70 refactor: replace mutex with sync.Once for rule configuration (#1118)

v1.5.0

07 Nov 16:34
Compare
Choose a tag to compare

Changelog

  • e1a4191 Appending Indicator to the list of projects using Revive. (#1065)
  • 53a111d adds check for receiver names length (#1048)
  • eb18252 adds filename-format rule (#1092)
  • e9b7f3a bumps go version to 1.21.1 and update dependencies (#1050)
  • 7fa1b27 chore(deps): update golang docker tag to v1.23 (#1071)
  • 78c3a6c chore: enable test shuffle and fix TestXDGConfigDirNoFile
  • ad0f03a chore: fix typo (#1079)
  • 599874c chore: remove unnecessary empty lines (#1080)
  • 1a3d95f chore: update actions (#1075)
  • ca2a32b code cleanup (#1054)
  • 0fc9613 docs(README): Update the list of contributors (#1076)
  • 8ef730c docs(README): fix TOC, add empty lines (#1074)
  • a213a5f documents default exclusion of vendor
  • 842b3e2 enhance Docker build process (#1070)
  • 3bead6f feat: add file-length-limit rule (#1072)
  • 501cc4a feat: ignore vendor if no exclude set (#1058)
  • 4c3641e fix #1032 by comparing string representations of types (#1049)
  • 7c068a7 fix duplicated findings for string-format when there is more than one… (#1085)
  • 3780c36 fix(deps): update module github.com/fatih/color to v1.18.0 (#1067)
  • cea28f8 fix(deps): update module golang.org/x/tools to v0.26.0 (#1057)
  • fa9af82 fix: change "GO" to "Go" in the use-any rule (#1077)
  • 3249a5e fix: enforce-repeated-arg-type-style rule finds false positives in case of invalid types (#1046)
  • 511e4e6 fix: extractInstructionFromJSON returns an error (#1082)
  • 798ce21 makes exported rule behave as golint (#1051)
  • d293239 refactor: add tests for isGenerated in the lint package (#1083)
  • 21344f1 refactor: change to t.Fatal(err) (#1081)
  • 0ac1ef7 refactor: fix revive.early-return issues (#1087)
  • 7c29b56 refactor: fix typo in the field name of TestFileFilterRule (#1086)
  • 14babf2 refactor: move lint.Name to name.go file (#1084)
  • 2ae6829 refactor: remove unused parameter in unexported function (#1096)
  • 6228ba5 refactor: simplify tests (#1089)
  • 662e02c refactor: use "filepath" instead of "path" (#1073)
  • fa37c00 removes redefinition of max built-in (#1052)
  • 9a8587c revive: add revive.toml for linting revive itself (#1094)
  • ff7b0ad rule.exported: add feature to disable checking on const,method,function, variable (#1047)
  • d76ffb9 update testdata: var case (#1055)

v1.4.0

22 Sep 17:19
a65fb8d
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.3.9...v1.4.0

v1.3.9

24 Jul 05:28
9ec5e55
Compare
Choose a tag to compare

Changelog

v1.3.7

07 Feb 17:05
5c5d6c1
Compare
Choose a tag to compare

Changelog

  • 3a62091 Adds rule max-control-nesting (#967)
  • f547cb5 Check function literals in unused-param (#966)
  • 4b62e4b Update list of contributors (#960)
  • 64dda06 feat: capitalise var naming to IDs (#964)
  • ef34f92 fix 968 by removing references to black and white lists (#969)
  • af4f9ea fix(deps): update module golang.org/x/tools to v0.17.0 (#963)
  • 5c5d6c1 fix: enforce-repeated-arg-type-style in config (#970)
  • 9abe06a refactor: rename blacklist to blocklist and whitelist to allowlist (#946)
  • be35a88 unhandled-error: use full function name in error message (#962)

v1.3.6

07 Jan 18:10
e33fb87
Compare
Choose a tag to compare

Changelog

  • e33fb87 fix: remove errored replace directive, fix go install (#957)

v1.3.5

03 Jan 23:25
f8e122f
Compare
Choose a tag to compare

Changelog

  • fd9a130 Add denyRegex support for import-alias-naming rule (#927)
  • 5ccebe8 Code cleaunp (#905)
  • d631844 Fix link to the build (#911)
  • cd2737a Load config from different locations prefer XDG_CONFIG_HOME before HOME (#912)
  • 9a2eab3 [dot-imports] support allow list of packages (#939)
  • d3aa99c chore(deps): update module github.com/spf13/afero to v1.11.0 (#945)
  • cdb8268 cleanup rules descriptions (#908)
  • 70ceb1c cleanup: removes or names unused parameters and receivers to _ (#907)
  • 29ba247 cli: refactor tests: use TestMain, t.Setenv (#931)
  • 36c2ee2 code cleanup: replace interface{} with any (#906)
  • 5c69df7 doc: fix examples (#899)
  • 9e80d93 extend parsing instructions to use json object instead of plain txt (#929)
  • 8d5724f feat: add support for enforce-repeated-arg-type-style rule (#953)
  • 5009140 feat: add support for enforce-slice-style rule (#900)
  • bcae8c7 fix trailing whitespaces (#917)
  • 12dd587 fix(deps): update module github.com/fatih/color to v1.16.0 (#933)
  • 8dbd587 fix(deps): update module golang.org/x/tools to v0.14.0 (#915)
  • cdc8caf fix(deps): update module golang.org/x/tools to v0.15.0 (#935)
  • 2862d06 fix(deps): update module golang.org/x/tools to v0.16.0 (#944)
  • 90b2112 fix(deps): update module golang.org/x/tools to v0.16.1 (#949)
  • f8e122f fix: add-constant struct tags in anonymous struct literals false positive (#954)
  • 2a1701a fix: enable tests in the test/utils.go file (#930)
  • 07eb596 fix: ignore dot import aliases in import-alias-naming rule (#938)
  • fb5bbe7 fix: literal calls case (#909)
  • 25ae73a fix:ignore color marks when compare stings in test (#926)
  • cb72bd8 formatters return output (#921)
  • 7da6a39 modifies-value-receiver: warn on slice or map (#943)
  • 1ef3c0f refactor: remove refs to io/ioutil (#918)
  • ccae54e refactor: remove unused parameter from pick function (#932)
  • 573f715 var-naming: avoid allocations with (*regexp.Regexp).MatchString (#928)
  • 782f0f1 variable to skip package name checks (#941)

v1.3.4

17 Sep 09:42
93219da
Compare
Choose a tag to compare

Changelog

  • 95acb88 Add unchecked-type-assertion (#889)
  • 356e667 feat: add support for enforce-map-style rule (#895)
  • f900b6c feat: add support for import-alias-naming rule (#881)
  • 883c4cc fix(deps): update module github.com/chavacava/garif to v0.1.0 (#882)
  • 3da2646 fix(deps): update module golang.org/x/tools to v0.13.0 (#887)
  • 0357df7 fix: add missing defer when unlocking mutex (#879)
  • ca0678c fix: dot-imports does not check test files (#884)
  • 7dffe3c quit config asap, remove unused pkg info (#896)
  • 93219da updates checksums (#897)

v1.3.3

24 Aug 17:44
Compare
Choose a tag to compare

Changelog

  • 72f9108 (var-naming) support private uppercase constants #865 (#866)
  • e5d5d09 Adding Checker Go library to the list of Who Uses. (#842)
  • 4c84a17 Allow import-blacklist to run against go test files (#862)
  • 2b4286e Drop if-return from default ruleset (#843)
  • ca38cc3 Fix typo in example documentation for early-return (#834)
  • e758901 Revert "fix: unnecesary alert for use-any when comments inside interface{} (#873)" (#874)
  • a270125 Update defaults.toml to sort rules (#844)
  • 9a87e6f Update goreleaser
  • b31eb18 adds [allowRegex] parameter for unused-parameter and unused-receiver rules (#858)
  • 2a1838f adds default config to enable all rules work out of the box (#830)
  • 68bf7e5 build: remove go 1.17.x from ci (#833)
  • a4ae369 build: shift to the supported go versions (1.20 and 1.21) (#878)
  • 95fcfe3 doc: add milvus to README usage (#845) (#847)
  • 7bd6668 feat: add rule for redundant import alias (#854)
  • 7cb4540 fix #846: time-equal garbled message when time returned from function (#868)
  • 9acfcc8 fix #863:false positive on return statement in a func lit passed to the deferred function (#870)
  • 16871ed fix #864: confusing-naming FP on methods of generic types (#869)
  • 9117f8e fix(deps): update github.com/chavacava/garif digest to 4752330 (#831)
  • 26bc59f fix(deps): update github.com/chavacava/garif digest to 4bd63c2 (#838)
  • 5ef33f1 fix(deps): update github.com/chavacava/garif digest to 8144c22 (#836)
  • da1c99d fix(deps): update module github.com/burntsushi/toml to v1.3.2 (#835)
  • 9564ad9 fix(deps): update module golang.org/x/tools to v0.10.0 (#841)
  • 6a2c5b1 fix(deps): update module golang.org/x/tools to v0.11.0 (#848)
  • df39256 fix(deps): update module golang.org/x/tools to v0.11.1 (#855)
  • b4fc3db fix(deps): update module golang.org/x/tools to v0.12.0 (#859)
  • 7cfe9d8 fix(deps): update module golang.org/x/tools to v0.9.3 (#837)
  • 4ee7542 fix: false positive in import-shadowing for method names (#876)
  • a155d92 fix: support method call from structures for string-format (#840)
  • 519ffbd fix: unnecesary alert for use-any when comments inside interface{} (#873)
  • ae07914 ifelse: option to preserve variable scope (#832)
  • 8941d19 imporve var-naming - add upperCaseConst option to allow UPPER_CASED constants #851 (#852)
  • 310d1d7 per-rule file exclude filters (#850) (#857)
  • 4bb48df refactor: extract shared code for linting if-else chains (#821)
  • 19a95d9 resolve #867: remove k[A-Z][A-Za-z\d]*$ sub-rule from var-naming (#871)