Comments (11)
@haya14busa yes, I will
from reviewdog.
Now you can use -filter-mode=nofilter
for that purpose.
https://github.com/reviewdog/reviewdog#filter-mode
If you want, you can also use github-pr-review
reporter as well with -filter-mode=nofilter
and -fail-on-error
to catch errors outside diff.
The new binary is not released yet, but I'll release it in a few days.
from reviewdog.
I encountered a similar problem when using flake8.
Just like
+ import yaml
import os # H306 imports not in alphabetical order
import yaml # F811 redefinition of unused
from reviewdog.
Now, you can use -reporter=github-check
to report changes outside diff.
Maybe we can take that margin into account here?
It could be interesting to implement for github-pr-review reporter, but it's too specific issue for github review API, so I don't have an immediate plan to implement it.
from reviewdog.
@haya14busa usage of -reporter=github-check
on a pull request is problematic as it's going to report errors for the whole repository.
The ability to see the errors only for the PR's diff is super convenient but the above limitation makes it a bit less appealing.
I would like to implement such feature, maybe you have some thoughts on that?
I think the github-pr-review
and github-pr-check
reporters can take into account not only the added lines but all lines that are in diff (including the margins of unchanged lines). WDYT?
from reviewdog.
On second thought, it sounds interesting.
If we use all lines in diff instead of arbitrary margin number, it sounds simple enough and GitHub Review API should always work.
@Le6ow5k1 can you implement it?
It could be default behavior, but I prefer to adding a flag to turn on/off this behavior.
from reviewdog.
I'm not sure whether my problem relates to this issue or not. So I decided to ask here first, before creating a new issue.
I'm using:
golangci-lint
lintergithub-pr-check
reportergit diff master
as a diff command
For this configuration, I can easily create a PR with a new linter error that reviewdog will miss. Let's say I have a constant that is defined in one file (with all other constants) and used only once in another place. Removing this single usage will lead to unused variable
linter error, but this error will appear in a file that is not even a part of the PR. So git diff master
won't contain this file. So reviewdog will not report this.
See this PR for a real-life example: moira-alert/moira#468
@haya14busa @Le6ow5k1 am I missing something? Is it possible to run reviewdog on the entire codebase, not just diff? Assuming I have zero linter complaints for current master branch.
from reviewdog.
@beevee
Yeah, it is possible to run reviewdog for the whole repository using -reporter=github-check
option.
from reviewdog.
@Le6ow5k1 -reporter=github-check
seems to work for us, thank you!
Is there a way to make local
reporter to work without diff? Sure, I can run bare golangci-lint
locally, but I'd like to preserve consistency between CI runs and local runs.
from reviewdog.
I believe currently there is no way to use local
reporter without diff, you have to pass -diff
command.
As a workaround you might try to specify diff between current and first commit git diff `git rev-list HEAD | tail -n 1`
from reviewdog.
The new binary released: https://github.com/reviewdog/reviewdog/blob/master/CHANGELOG.md#v0100---2020-05-07
from reviewdog.
Related Issues (20)
- fail-on-error=false (or left on default) still exits 1 using Github checks
- `-fail-on-error` doesn't work. reviewdog returns zero as exit code even if warnings are found in input HOT 4
- Does not use REVIEWDOG_GITHUB_API_TOKEN unless REVIEWDOG_SKIP_DOGHOUSE is set
- Can not Work HOT 1
- reviewdog: failed to get merge-base commit: exit status 1 HOT 2
- Tfsec- parse error: failed to unmarshal rdjson (DiagnosticResult): proto: syntax error (line 1:1): unexpected token HOT 2
- 0.15.0 installation fails on Alpine using `go get` HOT 1
- Support --filter-mode=[file/nofilter] in github-pr-review
- Can I use XO with review dog?
- `action-flake8` is broken due to an update in `astroid` HOT 1
- 'github-pr-review' reporter is not making suggestion for blank line addition
- Support for Vale text linter HOT 2
- Bundle related suggestions together
- [BUG] Sarif format not working HOT 9
- fail to run reviewdog: XML syntax error on line 10: expected attribute name in element HOT 1
- 'reviewdog: .git exist but is not a directory' in submodule
- Add support for Azure Devops
- I want to konw which LLM do you uesd HOT 4
- File filter for github doesn't correctly submit comments HOT 3
- Wrong line number is sent to Bitbucket Server Code Insight Reports HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reviewdog.