-
Notifications
You must be signed in to change notification settings - Fork 285
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
chavacava
merged 44 commits into
mgechev:master
from
mfederowicz:rules-avoid-using-panic
Dec 11, 2024
Merged
Changes from 41 commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
89322bc
refactor: replace panic with error in rules
mfederowicz 5665063
handle outside apply
mfederowicz cf72c3d
handle error from r.configure
mfederowicz 689e3c9
checkNumberOfArguments: handle error
mfederowicz 3109bd6
rules after review cleanup
mfederowicz c68d908
package.go: revert to master version
mfederowicz b607ec6
Merge branch 'master' into rules-avoid-using-panic
mfederowicz f5e3a0e
fix lack of variables after merge with master
mfederowicz 5c98306
handle configureErr in Apply func
mfederowicz 63a0088
replace configureErr with local variable
mfederowicz c7f09e0
Merge branch 'master' into rules-avoid-using-panic
mfederowicz a53dfc7
Merge remote-tracking branch 'upstream/master' into rules-avoid-using…
mfederowicz d47112b
remove package comment, except doc.go
mfederowicz fd97ee3
revert new line above:configureOnce
mfederowicz a451c02
cleanup code
mfederowicz 1c6e8e7
cleanup code
mfederowicz f17c9b1
replace configureOnce with sync.OnceValue
mfederowicz ae29706
lint: remove error return, exit is last step
mfederowicz fdcaa68
back to r.configureOnce.Do() variant with local error variable
mfederowicz af86a92
Merge branch 'master' into rules-avoid-using-panic
mfederowicz 0022083
cleanup after merge with master
mfederowicz 9c9e05e
package: handle errgroup.Group
mfederowicz 92bcf9e
Merge branch 'master' into rules-avoid-using-panic
mfederowicz aee44cb
Merge remote-tracking branch 'upstream/master' into rules-avoid-using…
mfederowicz 2d6cafa
after review changes
mfederowicz ea832f4
Merge branch 'master' into rules-avoid-using-panic
mfederowicz d6f17ff
cleanup rules, remove error from return signature
mfederowicz 3086a32
cleanup lint/rule.go
mfederowicz 093971c
error msg lowercase
mfederowicz d78563b
lowercace error msg
mfederowicz 5685fad
.gitignore: add .idea dir
mfederowicz 68e556a
merge with upstream
mfederowicz 3191797
merge with upstream
mfederowicz f6c7ee0
lowercase in error msg
mfederowicz 0e4a8c4
fix rule name
mfederowicz ef674f6
helper: newInternalFailureError
mfederowicz 5ebe459
add space in msg
mfederowicz 953b2a5
newInternalFailureError: update helper comment
mfederowicz ed5e149
.gitignore: remove idea entry
mfederowicz 1628b5c
cleanup after review
mfederowicz 96de931
Merge branch 'master' into rules-avoid-using-panic
mfederowicz bad6ed8
cleanup after review
mfederowicz 634fa48
Apply suggestions from code review
chavacava e56fa62
fix printf parameters
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose adding a test to check a situation where
configureErr
is notnil
. Not for all rules but at least for a one.