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 JSON output type #26

Merged
merged 7 commits into from
Oct 20, 2020
Merged

Add JSON output type #26

merged 7 commits into from
Oct 20, 2020

Conversation

caitlinelfring
Copy link
Member

@caitlinelfring caitlinelfring commented Oct 17, 2020

Please check if the PR fulfills these requirements

  • The commit message follows our guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
Feature

What is the current behavior? (You can also link to an open issue here)
No JSON printer

What is the new behavior (if this is a feature change)?
Outputs file results as a json string. This will be very helpful for IDE integrations

Note that this will not be an array of FileResults, but will be separate JSON strings for each file result, since the results are written to the console asynchronously.

Does this PR introduce a breaking change? (What changes might users need to make due to this PR?)
No

Other information:

@caitlinelfring caitlinelfring added the enhancement New feature or request label Oct 17, 2020
@codecov
Copy link

codecov bot commented Oct 20, 2020

Codecov Report

Merging #26 into main will increase coverage by 0.87%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #26      +/-   ##
==========================================
+ Coverage   93.80%   94.67%   +0.87%     
==========================================
  Files          18       19       +1     
  Lines         436      451      +15     
==========================================
+ Hits          409      427      +18     
+ Misses         16       13       -3     
  Partials       11       11              
Impacted Files Coverage Δ
pkg/printer/json.go 100.00% <100.00%> (ø)
pkg/printer/printer.go 100.00% <100.00%> (ø)
pkg/result/lineresult.go 100.00% <100.00%> (+7.89%) ⬆️
pkg/rule/severity.go 92.85% <100.00%> (+0.26%) ⬆️

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 84d282c...9f366d2. Read the comment docs.

@caitlinelfring caitlinelfring changed the title Feature: add JSON printer Add JSON output type Oct 20, 2020
@caitlinelfring caitlinelfring merged commit 3dc4c1e into main Oct 20, 2020
@caitlinelfring caitlinelfring deleted the feature/json-printer branch October 20, 2020 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant