Skip to content

Comments

Make 'style' target silent#5203

Closed
wilzbach wants to merge 1 commit intodlang:masterfrom
wilzbach:style-make-silent
Closed

Make 'style' target silent#5203
wilzbach wants to merge 1 commit intodlang:masterfrom
wilzbach:style-make-silent

Conversation

@wilzbach
Copy link
Contributor

This is a short follow-up to #5199 and this PR sets calls and echos in the style target to silent as Andrei requested. A message(s) will only be printed in case of an error.

However, I am not so convinced that this is a good idea because (a) it might make debugging more difficult and (b) there will be no visual feedback for 10-15s.

Anyways here are the potential changes.
(I opened this PR because I am fine with both ways.)

@echo "Check for trailing whitespace"
grep -nr '[[:blank:]]$$' etc std ; test $$? -eq 1
@grep -nr '[[:blank:]]$$' etc std && \
{ echo "Check for trailing whitespace" && exit 1; } ; exit 0
Copy link
Member

@andralex andralex Feb 26, 2017

Choose a reason for hiding this comment

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

Cool, one simpler pattern that would work is: pipe && { echo ... && return 1 } || return 0

The shell evaluates all && and || indiscriminately left to right. Eh, I guess not much of a simplification, up to you.

Also I'm using return instead of exit because I'm under the delusion one day we may use https://www.gnu.org/software/make/manual/html_node/One-Shell.html

@wilzbach wilzbach force-pushed the style-make-silent branch from acfa677 to 7efde72 Compare March 1, 2017 03:00
@quickfur
Copy link
Member

quickfur commented Apr 6, 2017

ping @wilzbach

Merge conflict; please rebase. This has been sitting here for far too long; let's get it merged!

@wilzbach
Copy link
Contributor Author

Hmm I never really cared about this target and as no one pushed for this, I am just going to close it.
These greps were never planned to be permanent anyways and the few time I have left I want to invest in finally managing to get proper DScanner plugins merged :)

@wilzbach wilzbach closed this May 12, 2017
@wilzbach wilzbach deleted the style-make-silent branch May 12, 2017 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants