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

fix: quiet mode filter only returns errors #416

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

steveszc
Copy link

The quiet mode filter should only return error severity results, this ensures that todo severity results are excluded from the quiet results.

Currently the login filters out only warning results, which leave todos in the set of filtered results. This causes an incorrect errorCount and causes the todos being displayed in the --quiet output, which should not be the case.

fixes #415

The quiet mode filter should only return error severity results,
this ensures that todo severity results are excluded from the quiet results.
@steveszc
Copy link
Author

I did not see any tests covering --quiet mode. Seems like this would be good to add, but seemed outside the scope of this pr.

@scalvert
Copy link
Collaborator

Hey @steveszc, thanks for the PR! We do have a test for the --quiet flag

it('should filter warn with --quiet', async () => {

@scalvert
Copy link
Collaborator

So it's the INCLUDE_TODO flag's presence that determines whether results with the todo severity are included. If this flag isn't present, the results won't include those with todo severity, so I'm not sure your addition would have any effect in that case.

What your change would have an effect on is whether INCLUDE_TODO and --quiet were used in conjunction.

It's probably useful to have a test that covers that specific scenario.

@scalvert
Copy link
Collaborator

Thinking about this more, I'm not sure --quiet should exclude todos. Why would I not instead simply omit INCLUDE_TODO rather than having to filter them out? Is there a specific scenario we're trying to address?

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.

--quiet mode reports todos as errors
2 participants