Skip to content

Commit

Permalink
Merge pull request #22 from deepsourcelabs/fix-unexpected-issue
Browse files Browse the repository at this point in the history
Fix unexpected issue being reported when pragmas are used
  • Loading branch information
deepak-deepsource authored Mar 13, 2023
2 parents 3588bc1 + 97b1bd6 commit 9288247
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cmd/scatr/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"github.com/spf13/cobra"
)

const version = "0.4.1"
const version = "0.4.2"

var versionCmd = &cobra.Command{
Use: "version",
Expand Down
9 changes: 4 additions & 5 deletions runner/diff.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,10 @@ func diffChecksResult(
pragmaIssues, ok := p.Issues[iss.Code]
if !ok {
// issue code mismatch
// if shouldReport(f, iss.Code) {
// fmt.Println("Unexpected c:", iss.Code)
issues.Unexpected = append(issues.Unexpected, iss)
passed = false
// }
if shouldReport(f, iss.Code) {
issues.Unexpected = append(issues.Unexpected, iss)
passed = false
}
p.Hit[iss.Code] = true
continue
}
Expand Down

0 comments on commit 9288247

Please sign in to comment.