Skip to content

bug: lingering linter diagnostics #706

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

Closed
1 task done
gnikit opened this issue Oct 10, 2022 · 0 comments · Fixed by #758
Closed
1 task done

bug: lingering linter diagnostics #706

gnikit opened this issue Oct 10, 2022 · 0 comments · Fixed by #758
Assignees
Labels

Comments

@gnikit
Copy link
Member

gnikit commented Oct 10, 2022

Is there an existing issue for this?

  • 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

Screencast.2022-10-10.14.44.38.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"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

1 participant