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

Add configuration option to allow comment driven ignores for lint #73

Merged
merged 4 commits into from
May 31, 2020

Conversation

bufdev
Copy link
Member

@bufdev bufdev commented May 30, 2020

Fixes #63.

To use:

buf:
  lint:
    allow_comment_ignores: true

Then, in the leading comments for something that will error on lint:

// buf:lint:ignore MESSAGE_PASCAL_CASE
message foo {}

The item will be ignored if any space-trimmed line of the leading comment starts with buf:lint:ignore ID.

@codecov
Copy link

codecov bot commented May 30, 2020

Codecov Report

Merging #73 into master will increase coverage by 0.18%.
The diff coverage is 84.84%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   70.37%   70.55%   +0.18%     
==========================================
  Files         149      150       +1     
  Lines        8202     8266      +64     
==========================================
+ Hits         5772     5832      +60     
- Misses       1807     1811       +4     
  Partials      623      623              
Impacted Files Coverage Δ
...rnal/buf/bufcheck/buflint/buflintcfg/buflintcfg.go 84.61% <ø> (ø)
internal/buf/bufcheck/internal/checker_builder.go 87.50% <ø> (ø)
internal/buf/bufsrc/protosrc.go 76.41% <ø> (ø)
internal/buf/bufsrc/merge_comment_location.go 60.00% <60.00%> (ø)
internal/buf/bufsrc/named_descriptor.go 81.48% <71.42%> (-4.24%) ⬇️
internal/buf/bufcheck/internal/runner.go 76.92% <75.00%> (-3.85%) ⬇️
...fanalysis/bufanalysistesting/bufanalysistesting.go 100.00% <100.00%> (+2.53%) ⬆️
internal/buf/bufcheck/bufbreaking/handler.go 66.66% <100.00%> (ø)
internal/buf/bufcheck/bufbreaking/internal/util.go 64.88% <100.00%> (ø)
internal/buf/bufcheck/buflint/buflint.go 88.00% <100.00%> (+0.76%) ⬆️
... and 12 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1452dc9...3d04fe8. Read the comment docs.

@bufdev bufdev changed the title WIP: Add configuration option to allow comment driven ignores for lint Add configuration option to allow comment driven ignores for lint May 30, 2020
@bufdev bufdev merged commit b60dcfa into master May 31, 2020
@bufdev bufdev deleted the comment-driven-ignores branch May 31, 2020 15:04
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

Successfully merging this pull request may close these issues.

Add configuration option to enable inline comment-driven ignores
1 participant