Skip to content

Too many absolute_paths_linters false positives #199

@fangly

Description

@fangly

Hi Jim,

This issue is related to issue #58.

I get quite a few false positives from the absolute path linter. The strings that generated the lints look like: "/aS: 3\n/bS: Inf\n/cS: -2.2\n/dS: x" and to me, the offending character is "\n" which is highly unlikely to be included in a file path. I envison that the linter should:

  1. Consider the string as a whole and estimate whether it is a valid path or not (i.e. if it contains forbidden characters).
  2. Determine if the path is absolute.

The problem then boils down to which characters should be forbidden in Linux and Windows paths. These webpages (http://stackoverflow.com/questions/1976007/what-characters-are-forbidden-in-windows-and-linux-directory-names, https://en.wikipedia.org/wiki/Filename#Reserved_characters_and_words) make it clear that it is list them and on Linux, almost all characters are allowed. But a pragmatic approach may be to blacklist:

Cheers,

Florent

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