Description
Describe the bug
A very minor bug, but a bug (I think) nonetheless. If I use
a specific subroutine/function from a module, the linter can't find it if the name of the subroutine is followed by a comment. If I have multiple subroutines/functions after the only:
statement, then only the last one will not be found by the linter (if it is followed by a comment).
To Reproduce
- Create a module with a subroutine.
- Create a second module which
use
es the subroutine from the first module - Compare linting behavior with or without a comment of the
use
statement
Expected behavior
fortls should find use
ed procedures regardless of whether they are followed by a comment or not.
Screenshots & Animations
used_module.f90
user_module.f90 attempted hover / peek with comment (does not work)
user_module.f90 attempted hover without comment (works correctly)
Setup information (please complete the following information):
- OS: [Windows 11]
- Python Version [3.12.7]
- fortls Version [3.1.2]
- Code editor used [VSCode]
- the Fortran extension for the code editor and its version [Modern Fortran v3.2.0 (also checked with Modern Fortran prerelease v3.4.2024101621]
- Compiler [gfortran 14.2.0]
Configuration information (please complete the following information):
relevant snippet from Workspace settings.json:
"fortran.linter.modOutput": "${workspaceFolder}/.vscode/linter",
"fortran.linter.includePaths": [
"${workspaceFolder}/.vscode/linter"
],
Edit: Removed description of a "workaround" using a comma after the subroutine name since this is invalid syntax.