0
mac osx catalina (latest)
emacs 26.3 from homebrew
flycheck
gfortran 9.3.0

I am trying to use flycheck to clean up and reorganize some code. Right now I would like to see some warnings to clean them up, but there are some "errors" that flycheck is marking that I don't want to change at this point (also not sure how)

See the example screenshots below.

When an error about a gnu-extension is highlighted, flycheck will not show me where the unused variables are. I'd like to either silence some errors, or alternatively just have flycheck show me the warnings about the unused variables.

How can I do that

Pic 1: showing the extension error but not the unused variable enter image description here

Pic 2: showing the unused variable after extension use is commented out enter image description here

1

With the default gfortran checker options, it seems checking stops after the first error. You could try options that issue warnings that would otherwise be errors:

(setq flycheck-gfortran-language-standard "gnu")
(add-to-list 'flycheck-gfortran-warnings "pedantic")
2
  • thanks very much. I had tried something similar to this, but obviously was different and didn't work. I should also mentioned I confirmed this works on my linux setup, but haven't yet circled back to the mac setup that this was reported with, so I will have to double check that. – Vince W. Jun 29 '20 at 14:26
  • Also, I see that I had been setting the standard to "f2018" which obviously throws an error for gnu extensions that are not part of the language standard. Makes sense. Thanks very much, so perhaps in my case I actually want to leave the pedantic warnings set out, so that I don't see warnings about the gnu extensions if I am using them intentionally. Thanks again – Vince W. Jun 29 '20 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.