Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support full path in call #6

Open
toejough opened this issue Mar 2, 2020 · 3 comments
Open

support full path in call #6

toejough opened this issue Mar 2, 2020 · 3 comments

Comments

@toejough
Copy link

toejough commented Mar 2, 2020

turns out the revision parsing needs an exact local path from the project root, or it filters results out...

openlynt -path pkg/<redacted>.go
[openlynt] filtered 7 violations in pkg/<redacted>.go due to revision limits
pkg/<redacted>.go:1688 violation of TODO/FIXME/XXX format: expected at least 2 lines of context but have 1

openlynt -path /Users/<redacted>/pkg/<redacted>.go
[openlynt] filtered 8 violations in /Users/<redacted>/pkg/<redacted>.go due to revision limits

We should support the full path in the call.

My immediate use case is for use with https://github.com/iamcco/diagnostic-languageserver. As-is, if I use the revision filter, the language server never calls any violations out. I can remove the revision filter, and then the language server sees the errors, but... there are a lot of them :-P

I could ask the diagnostic-languageserver folks to allow module-local paths, too, but we should support fully-specified paths anyway.

@chrsm
Copy link
Collaborator

chrsm commented Mar 2, 2020

👍 I'll look in to this.

@toejough
Copy link
Author

toejough commented Apr 3, 2020

relatedly, I think there's some general breakage here now.

Given 8 violations pre-revision limit in a file

When I

  • add two new FIXME's, each on a single line and no link
  • commit one of them, and leave the other in the worktree

Then:

  • openlynt ./ filters them all out (unexpected)
  • openlynt -path <full path> filters them all out (previously reported)
  • openlynt -path <local path> filters out all the committed violations, but errors on the one in the worktree (unexpected) (edited - can no longer reproduce)
  • openlynt -path <local path> -revfilter=false errors on all 10 violations (expected)

@chrsm
Copy link
Collaborator

chrsm commented Apr 4, 2020

Can you show me on Monday?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants