-
Notifications
You must be signed in to change notification settings - Fork 815
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
Staticcheck cleanup #4751
Merged
vytautas-karpavicius
merged 31 commits into
cadence-workflow:master
from
vytautas-karpavicius:staticcheck-cleanup
Feb 28, 2022
Merged
Staticcheck cleanup #4751
Changes from 1 commit
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
0d13208
unnecessary use of fmt.Sprintf (S1039)
vytautas-karpavicius 5ed4aee
could eliminate this type assertion (S1034)
vytautas-karpavicius b2d393a
package is being imported more than once (ST1019)
vytautas-karpavicius de43cb0
redundant return statement (S1023)
vytautas-karpavicius aff55fc
should use make(...) instead (S1019)
vytautas-karpavicius bf3a603
should omit nil check; len() for nil slices is defined as zero (S1009)
vytautas-karpavicius b12ec6e
should merge variable declaration with assignment on next line (S1021)
vytautas-karpavicius 71dc77f
should use fmt.Fprintf instead of fmt.Fprint(fmt.Sprintf(...)) (S1038)
vytautas-karpavicius ab75516
hould replace this if statement with an unconditional strings.TrimPre…
vytautas-karpavicius b80849d
should use bytes.Equal(data, data2) instead (S1004)
vytautas-karpavicius e1f8e61
should use 'return X' instead of 'if X { return true }; return false'…
vytautas-karpavicius a03daba
should omit comparison to bool constant, can be simplified to trees[b…
vytautas-karpavicius f74777a
should replace loop with ancestors = append(ancestors, branchInfo.Anc…
vytautas-karpavicius aecde22
should use a simple channel send/receive instead of select with a sin…
vytautas-karpavicius 9d59bd8
value of type int cannot be used with binary.Write (SA1003)
vytautas-karpavicius aaf593a
do not pass a nil Context, even if a function permits it; pass contex…
vytautas-karpavicius d6ffdbd
Using a deprecated function, variable, constant or field (SA1019)
vytautas-karpavicius e6d8a74
should not use built-in type string as key for value; define your own…
vytautas-karpavicius 030d974
removed unused code (U1000)
vytautas-karpavicius 4d895a9
error strings should not be capitalized (ST1005)
vytautas-karpavicius 64384eb
don't use unit-specific suffix Seconds (ST1011)
vytautas-karpavicius f1350d4
should use time.Since instead of time.Now().Sub (S1012)
vytautas-karpavicius 30bf124
should use time.Until instead of t.Sub(time.Now()) (S1024)
vytautas-karpavicius a1e55db
this value of ... is never used (SA4006)
vytautas-karpavicius 7158bb6
Fixing integration test
vytautas-karpavicius c00d8b6
Fix TestDNSSRVMode
vytautas-karpavicius 581a610
Merge branch 'master' into staticcheck-cleanup
vytautas-karpavicius 952f9dd
Fix TestExecutionFixerActivity_Success
vytautas-karpavicius fd03d0d
Merge branch 'staticcheck-cleanup' of github.com:vytautas-karpavicius…
vytautas-karpavicius ce4e2cd
Use int64 for binary.Write
vytautas-karpavicius 25e371f
Update service/frontend/clusterRedirectionHandler_test.go
vytautas-karpavicius 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
should use 'return X' instead of 'if X { return true }; return false'…
… (S1008)
- Loading branch information
commit e1f8e613e7f524eaa02a75a4ba4cfc5ed73c063a
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
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.
since we're working on wrapped errors: are you on a recent master? I'm not sure what the sequencing of these changes is. since this'd be a fairly obvious
errors.Is(err, sql.ErrNoRows)
transformation.(but probably not worth doing in this PR, keep this one full of obviously-noops)
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.
This is on recent master.
Yeah, lets leave it a separate PR, that addresses such cases.