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

Correct bad test cases and intermitent failure #122

Merged
merged 1 commit into from
Mar 22, 2017
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: 2 additions & 0 deletions filelist.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package main

import (
"sort"
"strings"

"github.com/ryanuber/go-glob"
Expand All @@ -41,6 +42,7 @@ func (f *fileList) String() string {
for p := range f.patterns {
ps = append(ps, p)
}
sort.Strings(ps)
return strings.Join(ps, ", ")
}

Expand Down
4 changes: 2 additions & 2 deletions filelist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ func Test_fileList_String(t *testing.T) {
},
{
name: "two patterns",
fields: fields{patterns: []string{"foo", "bar"}},
want: "foo, bar",
fields: fields{patterns: []string{"bar", "foo"}},
want: "bar, foo",
},
}
for _, tt := range tests {
Expand Down
1 change: 1 addition & 0 deletions rules/blacklist_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ package main
import (
_ "crypto/md5"
"fmt"
"os"
)
func main() {
for _, arg := range os.Args {
Expand Down
2 changes: 1 addition & 1 deletion rules/nosec_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestNosecBlock(t *testing.T) {
`package main
import (
"os"
"os/exect"
"os/exec"
)

func main() {
Expand Down
8 changes: 0 additions & 8 deletions rules/sql_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,6 @@ func TestSQLInjectionFalsePositiveA(t *testing.T) {
package main
import (
"database/sql"
"fmt"
"os"
//_ "github.com/mattn/go-sqlite3"
)

Expand Down Expand Up @@ -125,8 +123,6 @@ func TestSQLInjectionFalsePositiveB(t *testing.T) {
package main
import (
"database/sql"
"fmt"
"os"
//_ "github.com/mattn/go-sqlite3"
)

Expand Down Expand Up @@ -161,8 +157,6 @@ func TestSQLInjectionFalsePositiveC(t *testing.T) {
package main
import (
"database/sql"
"fmt"
"os"
//_ "github.com/mattn/go-sqlite3"
)

Expand Down Expand Up @@ -197,8 +191,6 @@ func TestSQLInjectionFalsePositiveD(t *testing.T) {
package main
import (
"database/sql"
"fmt"
"os"
//_ "github.com/mattn/go-sqlite3"
)

Expand Down