Preprocessor variables not accounted for in diagnostics. #959
-
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
| I understand the confusion, the diagnostics you are actually getting are from the linter, gfortran  in this case, of the Modern Fortran extension. You need to specify the preprocessor flag, as a linter extra argument e.g.  P.S. I will be moving this issue and converting it to a Discussion under the https://github.com/fortran-lang/vscode-fortran-support repo where it belongs | 
Beta Was this translation helpful? Give feedback.
-
| @gnikit Ah, that explains the inconsistency! Also why I couldn't reproduce it on the command line... Is there a way to specify those kinds of options in a config file? Or for the linter to parse  | 
Beta Was this translation helpful? Give feedback.
-
| Unfortunately not. I have been toying with the idea of merging the  | 
Beta Was this translation helpful? Give feedback.
-
| You can however specify project vscode configuration settings, either a a workspace or just a normal project. | 
Beta Was this translation helpful? Give feedback.



I understand the confusion, the diagnostics you are actually getting are from the linter, gfortran in this case, of the Modern Fortran extension. You need to specify the preprocessor flag, as a linter extra argument e.g.
-DMAX_PATHLENGTH=256.For more see https://github.com/fortran-lang/vscode-fortran-support#additional-linting-options.
P.S. I will be moving this issue and converting it to a Discussion under the https://github.com/fortran-lang/vscode-fortran-support repo where it belongs