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

Adds verbose config option to print output even if tasks succeed #135

Merged
merged 2 commits into from
Jul 6, 2020
Merged

Adds verbose config option to print output even if tasks succeed #135

merged 2 commits into from
Jul 6, 2020

Conversation

pragatheeswarans
Copy link
Contributor

When you have configured a lint rule to show warnings like,

'no-partial': 'warn'

the output is suppressed because we do not show any output if all the tasks run successfully. I have introduced a verbose flag which by default will be false. When turned on, this will store the output to an array and will be logged to the console when all the tasks are successfully completed. This helps in seeing the lint rules which are configured as warn in the terminal.

output

Related Issue

index.js Outdated
@@ -142,6 +148,12 @@ if (process.stdout.isTTY) {
.then(() => {
cache.setSync("linted-hash", commitHash);
debug('Cached Current Commit Hash');
if (options.verbose) {
Copy link
Owner

Choose a reason for hiding this comment

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

It would be great if this line also check the options.output array as the log can be ignored when there is no values in the array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure 👍

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This has been handled. Please verify the changes.

@theenadayalank
Copy link
Owner

Thank you @pragatheeswarans for taking your time to create this PR.

The changes looks good. Anyway, having an additional check on this comment would make this PR good to go.

@theenadayalank theenadayalank merged commit fbb226c into theenadayalank:master Jul 6, 2020
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.

3 participants