-
Notifications
You must be signed in to change notification settings - Fork 193
Description
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:
- Consider the string as a whole and estimate whether it is a valid path or not (i.e. if it contains forbidden characters).
- 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:
- on Windows:
*
?
"
<
>
|
- on both Linux and Windows: all standard ASCII control codes (https://en.wikipedia.org/wiki/C0_and_C1_control_codes#C0_.28ASCII_and_derivatives.29), i.e.
\0
\a
\n
etc
Cheers,
Florent