Skip to content

bug(syntax): Syntax Problem between Freeform and Fixedform #1131

@zhongxiang117

Description

@zhongxiang117

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

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