Skip to content

incl_suffixes ignored if they do not start with a dot #300

@albertziegenhagel

Description

@albertziegenhagel

Describe the bug
If I pass include suffixes via --incl_suffixes to fortls that do not start with a dot, they are simply ignored, with no warning whatsoever. This is especially surprising, since the description of the setting in the Modern Fortran VS Code extension lists the defaults without dots (see package.json#L443)

To Reproduce

Having a source repository with

<root>
 |- main.f90
 |- subdir
   |- include.inc

running python -m fortls --debug_rootpath=C:\source\test-fortls --incl_suffixes inc

gives

Testing "initialize" request:
  Root = "C:\source\test-fortls"
[INFO - 12:03:10] fortls - Fortran Language Server 2.13.1.dev172+gc04d2ab.d20230629 Initialized
  Successful!

  Source directories:
    C:\source\test-fortls

but running python -m fortls --debug_rootpath=C:\source\test-fortls --incl_suffixes .inc

gives the correct:

Testing "initialize" request:
  Root = "C:\source\test-fortls"
[INFO - 12:03:13] fortls - Fortran Language Server 2.13.1.dev172+gc04d2ab.d20230629 Initialized
  Successful!

  Source directories:
    C:\source\test-fortls\subdir
    C:\source\test-fortls

Expected behavior

In the order of my personal preference:

  1. It should not matter whether I pass the include suffixes with or without a dot in the beginning
  2. OR I should get a warning when a passed argument is incorrect and ignored
  3. OR The documentation should at least very explicitly state that a dot in the beginning is a mandatory requirement.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions