fortran-lang/vscode-fortran-support

bug(syntax): Syntax Problem between Freeform and Fixedform

zhongxiang117 opened this issue · 0 comments

Is there an existing issue for this?

  • I have searched the existing issues

Description

I noticed that "the configuration of the selection language mode" does not work between FortranFreeform and FortranFixedform, if the unusual file extension is used.

For my seeing, the output info for both of them are:

["INFO" - 11:25:36 AM] using linter: gfortran located in: /usr/bin/gfortran
["INFO" - 11:25:36 AM] Linter.arguments:
-Wall
-ffree-line-length-none
-ffixed-line-length-none

It is not correct, instead, for FortranFreeform, the Linter.arguments should be -ffree-form.

Screenshots

image

Code Example

! file should be with extension `.fpp` or any others, but not `.f90`

! shoud be freeform
program test
    print*, 'good'
end

Fortran Version (Free/Fixed Form)

Free Form e.g. F90+

Version of Modern Fortran

v3.2.0

Version of Visual Studio Code

v1.85.0

Platform and Architecture

Linux (Ubuntu)

Additional Information

gfortran version v9.4.0 & v11.4.0

Possible Solution:

Add "builtin" argument -ffree-form when language mode FortranFreeform is selected.

image