Skip to content

--reporter=github-pr-review does not work with sub directory #225

@nasa9084

Description

@nasa9084

when run go vet and reviewdog in sub directory, reviewdog do nothing.
from my forking & analysis, -strip option is working but wd in FilterCheck() is not working well.

info

  • go version: 1.12 (govet format also not work, I use -efm "%f:%l:%c: %m)
  • install with install.sh as README
  • on CircleCI Enterprise 2.x
  • with GitHub Enterprise

how I did

configured reviewdog run with go vet in .circleci/config.yml like:

- run:
  command: |
    test ${CI_PULL_REQUEST} || exit 0
    cd subdir
    curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ./bin
    go vet ./... 2>&1 | ./bin/reviewdog -name "go vet" -efm "%f:%l:%c: %m" -reporter=github-pr-review || true

before the commands, I configured api token and url as environment variable.

when directory structure is like:

|- .circleci/config.yml
|- directories including codes with not go codes
|- subdir
    |- go codes...

go vet reports unreachable code which i created for testing reviewdog, and the line is in PR changes like:
スクリーンショット 2019-06-18 17 14 17

repro example

https://github.com/nasa9084/reviewdog-test/pull/1

I want review comment by reviewdog but not

#!/bin/bash -eo pipefail
test ${CI_PULL_REQUEST} || exit 0
cd subdir
curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ./bin
go vet ./... 2>&1 | ./bin/reviewdog -name "go vet" -efm "%f:%l:%c: %m" -reporter=github-pr-review || true

reviewdog/reviewdog info checking GitHub for latest tag
reviewdog/reviewdog info found version: 0.9.12 for v0.9.12/Linux/x86_64
reviewdog/reviewdog info installed ./bin/reviewdog

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions