Skip to content

bug: gfortran linter cannot open module files  #954

@marcelmbn

Description

@marcelmbn

Is there an existing issue for this?

  • I have searched the existing issues

Description

In some repositories (see below for an example), a linter error Cannot open module file 'mctc_env_accuracy.mod' for reading at (1): No such file or directory is produced, even though the project can be built without any problems.
However, the linter produces the <module>.mod file as it pops up in the file manager in the same position as the original .f90 file containing the module source, but apparently, it can't be read.
This is particularly peculiar because this applies not to every module but only to some specific ones.

One example for this behavior is the above-mentioned module error popping up when opening the following repository in VS code:
https://github.com/grimme-lab/mctc-lib

If opening an issue in the specific repository is more appropriate, I apologize for the mismatch.

Screenshots

Screenshot from 2023-08-01 09-09-04

Expected Behaviour

In my understanding, the linter should also produce no errors if the project can be built without errors using the same compiler as for the linting (here: gfortran).

Version of Modern Fortran

v3.2.0

Version of Visual Studio Code

v1.80.2

Platform and Architecture

Ubuntu 22.04

Additional Information

Commit of mctc-lib used for the above test: grimme-lab/mctc-lib@305eb7a

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions