Skip to content

Commit

Permalink
Fix errcheck issues
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandear committed Feb 10, 2023
1 parent 4e4370a commit b33b443
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions errcheck/analyzer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ func TestAnalyzer(t *testing.T) {

t.Run("check blanks", func(t *testing.T) {
packageDir := filepath.Join(analysistest.TestData(), "src/blank/")
Analyzer.Flags.Set("blank", "true")
_ = Analyzer.Flags.Set("blank", "true")
_ = analysistest.Run(t, packageDir, Analyzer)
Analyzer.Flags.Set("blank", "false") // reset it
_ = Analyzer.Flags.Set("blank", "false") // reset it
})

t.Run("check asserts", func(t *testing.T) {
packageDir := filepath.Join(analysistest.TestData(), "src/assert/")
Analyzer.Flags.Set("assert", "true")
_ = Analyzer.Flags.Set("assert", "true")
_ = analysistest.Run(t, packageDir, Analyzer)
Analyzer.Flags.Set("assert", "false") // reset it
_ = Analyzer.Flags.Set("assert", "false") // reset it
})
}
2 changes: 1 addition & 1 deletion main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func TestMain(t *testing.T) {

os.Stderr = saveStderr
os.Stdout = saveStdout
os.Chdir(saveCwd)
_ = os.Chdir(saveCwd)

out := <-bufChannel

Expand Down

0 comments on commit b33b443

Please sign in to comment.