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

Reduce code smell reported by SonarCloud #5670

Merged
merged 2 commits into from
Oct 21, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion cmd/minikube/cmd/config/prompt.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,5 +151,5 @@ func posString(slice []string, element string) int {

// containsString returns true if slice contains element
func containsString(slice []string, element string) bool {
return !(posString(slice, element) == -1)
return posString(slice, element) != -1
}
2 changes: 1 addition & 1 deletion pkg/drivers/kvm/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var (
]`)
)

func Test_parseStatusAndReturnIp(t *testing.T) {
func TestParseStatusAndReturnIp(t *testing.T) {
type args struct {
mac string
statuses []byte
Expand Down
2 changes: 1 addition & 1 deletion pkg/minikube/config/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ func TestWriteConfig(t *testing.T) {
}
}

func Test_encode(t *testing.T) {
func TestEncode(t *testing.T) {
var b bytes.Buffer
for _, tt := range configTestCases {
err := encode(&b, tt.config)
Expand Down