Skip to content

Commit

Permalink
fix: running revive in CI (#1205)
Browse files Browse the repository at this point in the history
* fix: running revive in CI

* fix line-length-limit issue
  • Loading branch information
alexandear authored Jan 23, 2025
1 parent 1117372 commit d9c61c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ jobs:
uses: morphy2k/revive-action@v2
with:
config: revive.toml
path: ./...
3 changes: 2 additions & 1 deletion rule/string_format.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,8 @@ func (w *lintStringFormatRule) parseArgument(argument any, ruleNum int) (scopes
return stringFormatSubruleScopes{}, regex, false, "", w.parseScopeError("unable to parse rule scope", ruleNum, 0, scopeNum)
} else if len(matches) != 4 {
// The rule's scope matched the parsing regex, but an unexpected number of submatches was returned, probably a bug
return stringFormatSubruleScopes{}, regex, false, "", w.parseScopeError(fmt.Sprintf("unexpected number of submatches when parsing scope: %d, expected 4", len(matches)), ruleNum, 0, scopeNum)
return stringFormatSubruleScopes{}, regex, false, "",
w.parseScopeError(fmt.Sprintf("unexpected number of submatches when parsing scope: %d, expected 4", len(matches)), ruleNum, 0, scopeNum)
}
scope.funcName = matches[1]
if len(matches[2]) > 0 {
Expand Down

0 comments on commit d9c61c1

Please sign in to comment.