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

feat: Add a -r/--reporters configuration flag #89

Merged
merged 9 commits into from
Oct 26, 2023
Merged

Conversation

JoseAngel1196
Copy link
Contributor

This PR

Fixes #50

@JoseAngel1196 JoseAngel1196 requested a review from a team as a code owner October 24, 2023 01:02
@JoseAngel1196 JoseAngel1196 changed the title Add a -r/--reporters configuration flag feat: Add a -r/--reporters configuration flag Oct 24, 2023
@codecov
Copy link

codecov bot commented Oct 24, 2023

Codecov Report

Merging #89 (9037176) into main (43cade8) will decrease coverage by 0.29%.
The diff coverage is 20.00%.

@@            Coverage Diff             @@
##             main      #89      +/-   ##
==========================================
- Coverage   74.85%   74.57%   -0.29%     
==========================================
  Files          15       15              
  Lines         704      704              
==========================================
- Hits          527      525       -2     
- Misses        168      170       +2     
  Partials        9        9              
Flag Coverage Δ
unittests 74.57% <20.00%> (-0.29%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
cmd/root.go 30.00% <100.00%> (-4.38%) ⬇️
config/config.go 74.19% <ø> (ø)
internal/scan.go 0.00% <0.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

cmd/root.go Outdated Show resolved Hide resolved
@tarkatronic
Copy link
Contributor

I'm going to set this as hacktoberfest-accepted since I think the core direction is right. Unfortunately my recent PR #88 broke CLI flags, which will need to be fixed separate of this.

One good additional test here might be to ensure that setting reporters = ["foo"] in a config file makes it through to the config object. Or you could even just add that on to an existing test.

The one other change is that we need to be sure the console reporter is only used if it is activated!

@tarkatronic tarkatronic added the hacktoberfest-accepted PR is accepted for Hacktoberfest (but not ready for approval) label Oct 25, 2023
@JoseAngel1196
Copy link
Contributor Author

I'm going to set this as hacktoberfest-accepted since I think the core direction is right. Unfortunately my recent PR #88 broke CLI flags, which will need to be fixed separate of this.

One good additional test here might be to ensure that setting reporters = ["foo"] in a config file makes it through to the config object. Or you could even just add that on to an existing test.

The one other change is that we need to be sure the console reporter is only used if it is activated!

Done! I considered re-using the existing TestGetUserConfigFromEnv instead of adding a new test.

config/config_test.go Outdated Show resolved Hide resolved
internal/scan.go Show resolved Hide resolved
cmd/root.go Outdated Show resolved Hide resolved
Copy link
Contributor

@tarkatronic tarkatronic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this, thank you!

@tarkatronic tarkatronic merged commit d3223ee into main Oct 26, 2023
28 of 30 checks passed
@tarkatronic tarkatronic deleted the jose/issues-50 branch October 26, 2023 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest-accepted PR is accepted for Hacktoberfest (but not ready for approval)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a -r/--reporters configuration flag
2 participants