-
Notifications
You must be signed in to change notification settings - Fork 429
Squelch reports #629
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
Squelch reports #629
Conversation
…played in the report output table. This can be used to show message ID's that the user can use to filter against in the upcoming `squelch` option.
…y a new option every time we might want to allow or disallow new output. Adds two new options: - `squelch-id` (default **no**) will provide tags during Tidy's output that can be used to silence warnings. For example, `MISSING_ENDTAG_OPTIONAL` will be shown after warnings of that type. Then in the future, the user can use... - `squelch` (default NULL) takes a list of message identification tags. Messages of this tag type will then be muted from output. This gives the user great control over hiding things that he or she doesn't care about seeing. However, muted errors/warnings still count toward error summaries. If we merge this, then TidyShowMetaChange and TidyWarnPropAttrs are candidates for removal (using the deprecation mechanism Tidy now has, these will continue to work, though).
I'll fork the test repo to add a #629 test case, too, which will provide an example. |
@balthisar wow, this sort of seems like an out-of-the-blue Feature Request ;=)) I have now had a chance to You say the reason for this is - This gives the user great control over hiding things that he or she doesn't care about seeing. - sounds good... no problem... Is this a Feature Request by you, or do others feel the need for this as well? Please ponit me to the issues... I am afraid I still do not see any use case where specific messages need to be suppressed, other than the control we already have... Maybe you can open a And the name,
And wikipedia seems to concentrate on the second meaning... Yes, in say Merriam-Websters, I can find the senses of Then it seems you want the user to know the message identification name, internal to the library, like Assume you intend to massively expand the public API, so that I could find a message to be Finally, tidy library user can already install a message filter, which you also added, to filter out what they do not want... You can see, at this moment, without lots more discussion, and reasoning, hopefully in a feature request Ok, back here later - I always prepare my replies offline - and trying to be positive... First still against the choice of the option name, If I was searching for options to Really what is the use case, given that I understand it will still count in the warning/error count? We can use Is this just a way to I guess I should stop here. It goes without saying, I do not support this PR, at this time... Maybe more feedback will make it clearer... maybe I am just confused... thanks... |
"squelch," not "squelsh," and as an electrical engineer, yeah, it means to silence (specifically it's to allow a certain signal threshold). Hmmm... maybe doesn't sound as good to non-American ears, but trivial to change to "mute" or "silence" or whatever. In our lingo, one might say "squelch that idea," but also in our lingo to "be pissed" is "be upset," so it's no surprise that it doesn't resonate in other regions. Console users don't use the library, so they have no ability to filter. This offers a nice compromise between "I don't want to see that warning!" and "Show me everything!" Yes, the idea is to eliminate Oh, two new options. Try running the PR with the And, not really a new feature request, but kind of the backbone to #607 and #609. |
respectively. Updated matching cases in test branch accordingly.
NomenclatureI've managed to push updates naming the options Use CasesMaintenanceThis PR avoids a lot of future maintenance by avoiding the need to add new configuration options every time we want to add a new warning, but are afraid people won't like new warnings. PrecedentFor example Other Feature Requests#477, potentially generates changed output user might not want to see. InfrastructureInfrastructure makes things more manageable for future maintenance, and eliminating options (either now or in the future) makes things more maintainable in the long run. This is primarily an infrastructure addition, while giving users a nice new feature. User acceptanceGives console application users something new, out of the box, without having to build their own libtidy applications. Tidy needs to be flexible for users, and we want people to want to use Tidy rather than have to use Tidy. That's means we sometimes do more than fix existing bugs. ImpactIt does not remove any additional options, or change any output (HTML or messages) any way on its own, unless activated knowingly. |
@balthisar ok, warming to the idea ;=)) with the name change to Two things I found -
The output of And although I added
I guess I expect Still exploring... thanks for the additional comments... |
…um, taking them out of the dialogue range, so that they can properly be silenced.
@geoffmcl, good catch with I'll look at the Recently I've made some meticulous, in-depth study into all of the conditions that cause all message output, and made several internal code changes to manage these conditions centrally, rather than spreading conditions all over code. I'm pretty sure that all LibTidy output decisions (not console output) are managed completely in
Basically I think |
@balthisar, thanks, I guess we have a different idea about changing the As you correctly point out, I added But a recent PR, this?, or another?, you at the same time changed some 30 plus I am trying hard to get over my caution ;=)) Maybe you are right! And certainly agree But ok, let's go for it ;=)) We may or may not get blow-back when we release 5.6, hopefully next month... |
I'll merge this base on comments above, and will update the -q option separately. Right now, can't test the #604 fix, because it's already based on this branch! |
Adds message squelching (muting) to Tidy, avoiding the need to specify a new option every time we might want to allow or disallow new output. Adds two new options:
squelch-id
(default no) will provide tags during Tidy's output thatcan be used to silence warnings. For example,
MISSING_ENDTAG_OPTIONAL
will be shown after warnings of that type. Then in the future, the user can
use...
squelch
(default NULL) takes a list of message identification tags.Messages of this tag type will then be muted from output.
This gives the user great control over hiding things that he or she doesn't care
about seeing. However, muted errors/warnings still count toward error summaries.
If we merge this, then TidyShowMetaChange and TidyWarnPropAttrs are candidates
for removal (using the deprecation mechanism Tidy now has, these will continue
to work, though).