Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion internal/rule/rulefunction/rulefunction.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func brokenOutputList(list []string) string {

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

Expand Down
2 changes: 1 addition & 1 deletion internal/rule/rulefunction/sketch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestSketchNameMismatch(t *testing.T) {
func TestProhibitedCharactersInSketchFileName(t *testing.T) {
testTables := []sketchRuleFunctionTestTable{
{"Has prohibited characters", "ProhibitedCharactersInFileName", ruleresult.Fail, "^Prohibited CharactersInFileName.h$"},
{"No prohibited characters", "Valid", ruleresult.Pass, ""},
{"No prohibited characters", "AllowedCharactersInFilenames", ruleresult.Pass, ""},
}

checkSketchRuleFunction(ProhibitedCharactersInSketchFileName, testTables, t)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
void setup() {}
void loop() {}