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

Toggle warnings off and on? #2134

Closed
xged opened this issue Jun 27, 2015 · 11 comments
Closed

Toggle warnings off and on? #2134

xged opened this issue Jun 27, 2015 · 11 comments
Labels
Discussion Enhancement ☺ stale marked as a stale issue/pr (usually by a bot) Syntax-checking

Comments

@xged
Copy link

xged commented Jun 27, 2015

How about SPC e w to toggle warnings off/on permanently?

@codygman
Copy link

codygman commented Jul 1, 2015

I'd be careful to not ignore too many warnings and advise enabling incomplete-patterns by putting :set -fwarn-incomplete-patterns in your ~/.ghci configuration file (on linux and mac, not sure where windows ghci config is).

You can also put any of these in your ghci configration file: https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/options-sanity.html

I think just giving you a list of warnings would answer your question, but overall do you a disservice. What are you trying to hide or get rid of that is bothering you?

@xged xged changed the title [Haskell] How to ignore warnings? [Haskell] How to hide warnings? Jul 5, 2015
@xged
Copy link
Author

xged commented Jul 5, 2015

Turn all warnings off for most of the time (not always) would not hurt. Editing ~/.ghci is useful to remove (specific) warnings completely, but that is not what I want.

P.S. Writing :set -w did not change the way flycheck behaves for me.

@xged xged closed this as completed Jul 5, 2015
@xged xged reopened this Jul 5, 2015
@xged xged changed the title [Haskell] How to hide warnings? [Haskell] Toggle warnings off and on? Jul 5, 2015
@TheBB
Copy link
Collaborator

TheBB commented Oct 26, 2015

From a cursory check it doesn't seem possible in flycheck to disable showing all warnings. You can turn off the individual checkers that produce them, or possibly configure the checkers themselves, but there doesn't seem to be a flycheck setting for: I only want to see errors, not warnings.

@lunaryorn?

@TheBB
Copy link
Collaborator

TheBB commented Oct 26, 2015

Removing the Haskell label as this is actually a flycheck feature request.

@TheBB TheBB changed the title [Haskell] Toggle warnings off and on? Toggle warnings off and on? Oct 26, 2015
@d12frosted
Copy link
Collaborator

@TheBB yeah, good call.

@swsnr
Copy link
Contributor

swsnr commented Oct 26, 2015

@TheBB You can filter the error list by level, see flycheck-error-list-minimum-level. A similar option exists for navigation, too. There's no way to inhibit warnings from being shown in the buffer itself, though, and I don't plan to add such a feature.

@TheBB
Copy link
Collaborator

TheBB commented Oct 26, 2015

Okay, so the answer becomes:

  • To remove warnings from the error list, see ☝️
  • To remove warnings from the modeline, set spaceline-flycheck-warning-p to nil (in develop)
  • To remove warnings in general (also from the buffer), you can advise flycheck-relevant-error-p.

We can possibly include such an advise as a toggle.

@swsnr
Copy link
Contributor

swsnr commented Oct 26, 2015

@TheBB You forgot navigation 😉

As for the advice, speaking as the maintainer of Flycheck I'm strictly against any advices for Flycheck functionality—actually, against any advises at all, fwiw. If you add advises for Flycheck I'll assume that you also take responsibility for all Flycheck issues that appear in Spacemacs, for I'll refuse to deal with them.

I'm sorry for the harsh words, but I've had my share of fun with broken and crappy advises, and I just don't feel like dealing with that anymore ☺️

If you'd like to have this feature then please implement it in Flycheck itself. I said that I don't plan to add such a feature myself—I just don't need it—but that shouldn't stop anyone from giving it a shot and opening a corresponding pull request for Flycheck. It's a reasonable feature, and nothing stands against merging it ☺️

@TheBB
Copy link
Collaborator

TheBB commented Oct 26, 2015

Okay, I interpreted your "don't plan to add such a feature" the wrong way, then.

@swsnr
Copy link
Contributor

swsnr commented Oct 26, 2015

@TheBB I see, I'm sorry for the misunderstanding 😊 I should have said that in a different way. Sorry

@github-actions
Copy link

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Please let us know if this issue is still valid!

@github-actions github-actions bot added the stale marked as a stale issue/pr (usually by a bot) label Feb 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Enhancement ☺ stale marked as a stale issue/pr (usually by a bot) Syntax-checking
Projects
None yet
Development

No branches or pull requests

6 participants