-
-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
simple: fix suggested fixes for S1004
Also update x/tools to latest version, as `analysistest.RunWithSuggestedFixes` is very recent. Signed-off-by: Sourya Vatsyayan <[email protected]> (cherry picked from commit a4eb707)
- Loading branch information
1 parent
a95c3b5
commit caa47cc
Showing
11 changed files
with
59 additions
and
10 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// +build darwin linux | ||
|
||
package pkg | ||
|
||
import "bytes" | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// +build darwin linux | ||
|
||
package pkg | ||
|
||
import "bytes" | ||
|
||
func fn() { | ||
_ = bytes.Equal(nil, nil) // want ` bytes.Equal` | ||
_ = !bytes.Equal(nil, nil) // want `!bytes.Equal` | ||
_ = bytes.Compare(nil, nil) > 0 | ||
_ = bytes.Compare(nil, nil) < 0 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This file exists just to make sure the package is still defined | ||
// when tests DO NOT run on darwin/linux | ||
package pkg |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
// +build !linux,!darwin | ||
|
||
package pkg | ||
|
||
import "bytes" | ||
|
||
func fn() { | ||
_ = bytes.Compare(nil, nil) == 0 // want ` bytes.Equal` | ||
_ = bytes.Compare(nil, nil) != 0 // want `!bytes.Equal` | ||
_ = bytes.Compare(nil, nil) > 0 | ||
_ = bytes.Compare(nil, nil) < 0 | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// This file exists just to make sure the package is still defined | ||
// when tests run on darwin/linux | ||
package pkg |