Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: replace panic with error in rules #1126

Merged
merged 44 commits into from
Dec 11, 2024
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
89322bc
refactor: replace panic with error in rules
mfederowicz Nov 14, 2024
5665063
handle outside apply
mfederowicz Nov 16, 2024
cf72c3d
handle error from r.configure
mfederowicz Nov 16, 2024
689e3c9
checkNumberOfArguments: handle error
mfederowicz Nov 16, 2024
3109bd6
rules after review cleanup
mfederowicz Nov 16, 2024
c68d908
package.go: revert to master version
mfederowicz Nov 16, 2024
b607ec6
Merge branch 'master' into rules-avoid-using-panic
mfederowicz Nov 16, 2024
f5e3a0e
fix lack of variables after merge with master
mfederowicz Nov 16, 2024
5c98306
handle configureErr in Apply func
mfederowicz Nov 17, 2024
63a0088
replace configureErr with local variable
mfederowicz Nov 17, 2024
c7f09e0
Merge branch 'master' into rules-avoid-using-panic
mfederowicz Nov 18, 2024
a53dfc7
Merge remote-tracking branch 'upstream/master' into rules-avoid-using…
mfederowicz Nov 18, 2024
d47112b
remove package comment, except doc.go
mfederowicz Nov 18, 2024
fd97ee3
revert new line above:configureOnce
mfederowicz Nov 18, 2024
a451c02
cleanup code
mfederowicz Nov 19, 2024
1c6e8e7
cleanup code
mfederowicz Nov 19, 2024
f17c9b1
replace configureOnce with sync.OnceValue
mfederowicz Nov 20, 2024
ae29706
lint: remove error return, exit is last step
mfederowicz Nov 20, 2024
fdcaa68
back to r.configureOnce.Do() variant with local error variable
mfederowicz Dec 7, 2024
af86a92
Merge branch 'master' into rules-avoid-using-panic
mfederowicz Dec 7, 2024
0022083
cleanup after merge with master
mfederowicz Dec 7, 2024
9c9e05e
package: handle errgroup.Group
mfederowicz Dec 7, 2024
92bcf9e
Merge branch 'master' into rules-avoid-using-panic
mfederowicz Dec 7, 2024
aee44cb
Merge remote-tracking branch 'upstream/master' into rules-avoid-using…
mfederowicz Dec 8, 2024
2d6cafa
after review changes
mfederowicz Dec 8, 2024
ea832f4
Merge branch 'master' into rules-avoid-using-panic
mfederowicz Dec 8, 2024
d6f17ff
cleanup rules, remove error from return signature
mfederowicz Dec 8, 2024
3086a32
cleanup lint/rule.go
mfederowicz Dec 8, 2024
093971c
error msg lowercase
mfederowicz Dec 8, 2024
d78563b
lowercace error msg
mfederowicz Dec 8, 2024
5685fad
.gitignore: add .idea dir
mfederowicz Dec 8, 2024
68e556a
merge with upstream
mfederowicz Dec 8, 2024
3191797
merge with upstream
mfederowicz Dec 8, 2024
f6c7ee0
lowercase in error msg
mfederowicz Dec 8, 2024
0e4a8c4
fix rule name
mfederowicz Dec 8, 2024
ef674f6
helper: newInternalFailureError
mfederowicz Dec 9, 2024
5ebe459
add space in msg
mfederowicz Dec 9, 2024
953b2a5
newInternalFailureError: update helper comment
mfederowicz Dec 9, 2024
ed5e149
.gitignore: remove idea entry
mfederowicz Dec 9, 2024
1628b5c
cleanup after review
mfederowicz Dec 10, 2024
96de931
Merge branch 'master' into rules-avoid-using-panic
mfederowicz Dec 10, 2024
bad6ed8
cleanup after review
mfederowicz Dec 10, 2024
634fa48
Apply suggestions from code review
chavacava Dec 11, 2024
e56fa62
fix printf parameters
Dec 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'master' into rules-avoid-using-panic
# Conflicts:
#	rule/string_format.go
mfederowicz committed Dec 10, 2024
commit 96de9318cfe4a9fdadce6ad67141793f34b5cdc8
4 changes: 0 additions & 4 deletions rule/string_format.go
Original file line number Diff line number Diff line change
@@ -84,10 +84,6 @@ const identRegex = "[_A-Za-z][_A-Za-z0-9]*"
var parseStringFormatScope = regexp.MustCompile(
fmt.Sprintf("^(%s(?:\\.%s)?)(?:\\[([0-9]+)\\](?:\\.(%s))?)?$", identRegex, identRegex, identRegex))

// #endregion

// #region Argument parsing

func (w *lintStringFormatRule) parseArguments(arguments lint.Arguments) error {
for i, argument := range arguments {
scopes, regex, negated, errorMessage, err := w.parseArgument(argument, i)
You are viewing a condensed version of this merge commit. You can view the full changes here.