pydistcheck icon indicating copy to clipboard operation
pydistcheck copied to clipboard

[new check] special characters in filepaths

Open jameslamb opened this issue 3 years ago • 0 comments

What should be checked?

pydistcheck should warn about the presence of filepaths with characters that can cause portability issues unrelated to encoding (#76 tracks a separate check on non-ASCII characters).

These include:

  • < (less than)
  • > (greater than)
  • : (colon)
  • " (double quote)
  • / (forward slash)
  • \ (backslash)
  • | (vertical bar or pipe)
  • ? (question mark)
  • * (asterisk)

(from "reserved characters" in the Windows filesystem docs).

They also include "control characters":

Filepaths only consisting of directory traversal characters should also result in a warning.

  • /
  • .
  • ..
  • \

Filepaths ending in the following should also result in warnings.

  • .
  • /
  • \
  • spaces (although other rules above should already prevent spaces)

What should the name of this check be?

special-characters-in-filepaths

Will this check introduce any additional configuration?

no

Details on additional configuration required.

No response

Distribution type

  • [X] source (e.g. .tar.gz)
  • [X] built (e.g. .whl)

Notes

  • https://stackoverflow.com/a/31976060/3986677

jameslamb avatar Oct 24 '22 03:10 jameslamb