Skip to content

Commit fa2d53e

Browse files
committed
Allow leading underscore in sketch filenames
The Arduino Sketch Specification defines the allowed format of sketch folder names and sketch code filenames. Arduino Lint's rule SS002 checks compliance with the specification. The Arduino Sketch Specification has been changed to allow a leading underscore in sketch folder names and sketch code filenames so the Arduino Lint rule code must be updated accordingly.
1 parent 43d385b commit fa2d53e

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

internal/rule/rulefunction/rulefunction.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func brokenOutputList(list []string) string {
105105

106106
// validProjectPathBaseName checks whether the provided library folder or sketch filename contains prohibited characters.
107107
func validProjectPathBaseName(name string) bool {
108-
baseNameRegexp := regexp.MustCompile("^[a-zA-Z0-9][a-zA-Z0-9_.-]*$")
108+
baseNameRegexp := regexp.MustCompile("^[a-zA-Z0-9_][a-zA-Z0-9_.-]*$")
109109
return baseNameRegexp.MatchString(name)
110110
}
111111

internal/rule/rulefunction/testdata/sketches/AllowedCharactersInFilenames/_LeadingUnderscore.ino

Whitespace-only changes.

0 commit comments

Comments
 (0)