Skip to content

Require cross-platform compatibility of sketch names in specification #2069

Closed

Description

Describe the request

Tighten the sketch folder and file name requirements in the Arduino Sketch Specification to ensure compliant names are compatible with all operating systems.

🙂 Shared Arduino sketches will be usable by anyone, regardless of which supported operating system they use.

Describe the current behavior

The Arduino Sketch Specification includes requirements for the names of the sketch folder and code files:

https://arduino.github.io/arduino-cli/dev/sketch-specification/#sketch-folders-and-files

🙁 Names that are compliant with the current specification are incompatible with the Windows operating system:

Ending With .

https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#:~:text=Do%20not%20end%20a%20file%20or%20directory%20name%20with%20a%20space%20or%20a%20period

Do not end a file or directory name with a space or a period. Although the underlying file system may support such names, the Windows shell and user interface does not.

Reserved Names

https://learn.microsoft.com/en-ca/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#win32-file-namespaces:~:text=Do%20not%20use%20the%20following%20reserved%20names

Do not use the following reserved names for the name of a file:

CON, PRN, AUX, NUL, COM0, COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT0, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8, and LPT9. Also avoid these names followed immediately by an extension

Arduino CLI version

N/A

Operating system

N/A

Operating system version

N/A

Additional context

I did not find any instances of specification-compliant names that would be incompatible with Linux or macOS.


Example of problem caused by specification-compliant sketch name:

arduino/arduino-ide#1833 (review)

Additional requests

Issue checklist

  • I searched for previous requests in the issue tracker
  • I verified the feature was still missing when using the latest nightly build
  • My request contains all necessary details

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions