Skip to content

Commit

Permalink
fix default behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
taraspos committed Oct 2, 2020
1 parent 8f34185 commit b7687c1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/reviewdog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,18 @@ github-pr-check reporter as a fallback.
cs = bbservice.NewReportAnnotator(client, reportName,
build.Owner, build.Repo, build.SHA)

// by default scan whole project.
// by default scan whole project with "filter.ModeNoFilter"
// Bitbucket pipelines doesn't give an easy way to know
// which commit run pipeline before so we can comapre between them
// however once PR is opened, Bitbucket Reports UI will do automatic
// filtering of annotations dividing them in two groups:
// - This pull request (10)
// - All (50)
if opt.diffCmd == "" || opt.filterMode == filter.ModeNoFilter {
if opt.diffCmd == "" && opt.filterMode == filter.ModeDefault {
opt.filterMode = filter.ModeNoFilter
}

if opt.filterMode == filter.ModeNoFilter {
ds = &reviewdog.EmptyDiff{}
} else {
d, err := diffService(opt.diffCmd, opt.diffStrip)
Expand Down

0 comments on commit b7687c1

Please sign in to comment.