vscode-fortran-support
vscode-fortran-support copied to clipboard
bug: lingering linter diagnostics
Is there an existing issue for this?
- [X] I have searched the existing issues
Description
I am not sure how well defined this behaviour is and I need to investigate further but I noticed that the latest versions of the linter seem to not be updating the diagnostics when we go from errors -> no errors. That seems to indicate that there is a lingering state that does not get disposed.
Clearing the diagnostics via the command palette seems to resolve the issue.
This issue was also noticed in the fpm project
Screenshots
https://user-images.githubusercontent.com/16143716/194880562-bde5c4f8-86c1-4735-b095-0174cd5b73c2.mp4
Expected Behaviour
Dispose diagnostics (errors) when code compiler conforming
Version of Modern Fortran
v3.4.2022101002
Version of Visual Studio Code
latest insiders
Platform and Architecture
Linux x64
Additional Information
MWE
metis.F90
module metis
use iso_c_binding
implicit none
private
#if IDXTYPEWIDTH == 32
integer, parameter, public :: idx_t = c_int32_t
#elif IDXTYPEWIDTH == 64
integer, parameter, public :: idx_t = c_int64_t
#else
#error "Incorrect user-supplied value fo IDXTYPEWIDTH"
#endif
#if REALTYPEWIDTH == 32
#elif REALTYPEWIDTH == 64
#else
#error "Incorrect user-supplied value for REALTYPEWIDTH"
#endif
contains
end module metis
settings.json
{
"files.associations": {
"defs.h": "c",
"struct.h": "c",
"metis.h": "c",
"metisbin.h": "c"
},
"fortran.fortls.preprocessor.definitions": {
"REALTYPEWIDTH": "64",
"IDXTYPEWIDTH": "64"
},
"fortran.linter.extraArgs": [
"-DIDXTYPEWIDTH=64",
"-DREALTYPEWIDTH=64"
],
"fortran.logging.level": "Debug"
}