Sketch
Arduino Lint provides 10 rules for the sketch
project type:
name mismatch (SS001
)¶
There is no .ino
sketch file with name matching the sketch folder. The primary sketch file name must match the folder
for the sketch to be valid.
More information:
here
Enabled for
superproject type: all
Category: structure
Subcategory: root folder
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | ERROR |
strict | ERROR |
prohibited character in filename (SS002
)¶
A sketch file's name contains a prohibited character.
More information:
here
Enabled
for superproject type: all
Category: structure
Subcategory: file name
Rule levels
compliance |
Level |
---|---|
permissive | ERROR |
specification | ERROR |
strict | ERROR |
file name too long (SS003
)¶
The sketch file's name exceeds the maximum length.
More information:
here
Enabled
for superproject type: all
Category: structure
Subcategory: file name
Rule levels
compliance |
Level |
---|---|
permissive | ERROR |
specification | ERROR |
strict | ERROR |
.pde extension (SS004
)¶
A sketch file uses the deprecated .pde
file extension. The .pde extension is used by both
Processing sketches and Arduino sketches. If the project has supplemental Processing
sketches, they should either be in the
data
subfolder of the sketch or
in the
extras
folder of the library.
Arduino sketches should use the modern .ino
extension.
More information:
here
Enabled for
superproject type: all
Category: structure
Subcategory: file name
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | WARNING |
strict | ERROR |
src folder case (SS005
)¶
The sketch's source subfolder name has incorrect case. This folder must be named exactly src
in order for the contents
to be compiled on case sensitive file systems (e.g., Linux).
More information: here
Enabled for superproject type: all
Category: structure
Subcategory: miscellaneous
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | ERROR |
strict | ERROR |
Arduino.h case (SC001
)¶
An #include
directive for a file matching the standardized Arduino core library's Arduino.h
header in all except
case (e.g., #include <arduino.h>
) was found in the sketch's code. This causes compilation failure on case-sensitive
file systems.
Enabled for superproject type: all
Category: code
Subcategory: miscellaneous
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | WARNING |
strict | ERROR |
no readme (SD001
)¶
None of the standard README file names (e.g., README.md
) were found in the sketch folder. This file provides
interested parties with a convenient and standardized location to get information about the project.
More information:
here
Enabled for superproject type: sketch
Category: documentation
Subcategory: miscellaneous
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | WARNING |
strict | ERROR |
no license file (SD002
)¶
None of the standard license file names (e.g., LICENSE.txt
) were found in the sketch's root folder. This file provides
interested parties with a convenient and standardized location to get information about the project's licensing and is
also used by GitHub for automatic license type classification.
More information:
here
Enabled for superproject type: sketch
Category: documentation
Subcategory: miscellaneous
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | WARNING |
strict | ERROR |
sketch.json JSON format (SM001
)¶
The sketch's sketch.json
metadata file is not a valid JSON document.
Enabled for superproject type: all
Category: sketch.json
Subcategory: general
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | ERROR |
strict | ERROR |
sketch.json data format (SM002
)¶
The sketch's sketch.json
metadata file does not have a valid data format.
More information: here
Enabled
for superproject type: all
Category: sketch.json
Subcategory: general
Rule levels
compliance |
Level |
---|---|
permissive | WARNING |
specification | ERROR |
strict | ERROR |