2
2
projects.
3
3
4
4
Its focus is on the structure, metadata, and configuration of Arduino projects, rather than the code. Rules cover
5
- [ specification] ( https://arduino.github.io/arduino-cli/latest/library-specification ) compliance, Library Manager
6
- submission [ requirements] ( https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ ) , and best practices.
5
+ specification compliance, Library Manager submission requirements, and best practices.
7
6
8
7
## Installation
9
8
@@ -17,44 +16,47 @@ Once installed, you only need to open a terminal at your project folder and run
17
16
arduino-lint
18
17
```
19
18
20
- This will automatically search for projects, detect their type, and run the appropriate checks on them .
19
+ This will automatically detect the project type and check it against the relevant rules .
21
20
22
21
The default configuration of ** arduino-lint** provides for the most common use case, but you have the option of changing
23
22
settings via [ command line flags] ( commands/arduino-lint.md ) :
24
23
25
24
### Compliance setting
26
25
27
- The ` --compliance ` flag allows you to configure the strictness of the checks.
26
+ The ` --compliance ` flag allows you to configure the strictness of the applied rules. The three compliance level values
27
+ accepted by this flag are:
28
28
29
- ` --compliance permissive ` will cause the checks to fail only when severe problems are found. Although a project that
30
- passes at the permissive setting will work with the current Arduino development software versions, it may not be fully
31
- specification-compliant, risking incompatibility or a poor experience for the users.
32
-
33
- ` --compliance specification ` , the default setting, enforces compliance with the official Arduino project specifications.
34
-
35
- ` --compliance strict ` enforces best practices, above and beyond the minimum requirements for specification compliance.
36
- Use this setting to ensure the best experience for the users of the project.
29
+ - ` permissive ` - failure will occur only when severe rule violations are found. Although a project that passes at the
30
+ permissive setting will work with the current Arduino development software versions, it may not be fully
31
+ specification-compliant, risking incompatibility or a poor experience for the users.
32
+ - ` specification ` - the default setting, enforces compliance with the official Arduino project specifications
33
+ ([ sketch] ( https://arduino.github.io/arduino-cli/latest/sketch-specification/ ) ,
34
+ [ library] ( https://arduino.github.io/arduino-cli/latest/library-specification/ ) ,
35
+ [ platform] ( https://arduino.github.io/arduino-cli/latest/platform-specification/ ) ).
36
+ - ` strict ` - enforces best practices, above and beyond the minimum requirements for specification compliance. Use this
37
+ setting to ensure the best experience for the users of the project.
37
38
38
39
### Library Manager setting
39
40
40
- Arduino Library Manager is the best way to provide installation and updates of Arduino libraries. In order to be
41
- accepted for inclusion in Library Manager, a library is required to meet some requirements.
41
+ [ Arduino Library Manager] ( https://www.arduino.cc/en/guide/libraries#toc3 ) is the best way to provide installation and
42
+ updates of Arduino libraries. In order to be accepted for inclusion in Library Manager, a library is required to meet
43
+ [ some requirements] ( https://github.com/arduino/Arduino/wiki/Library-Manager-FAQ ) .
42
44
43
45
** arduino-lint** provides checks for these requirements as well, controlled by the ` --library-manager ` flag.
44
46
45
- The checks for the Library Manager submission requirements are enabled via ` --library-manager submit ` . Even if your
46
- library isn't yet ready to be added to Library Manager, it's a good idea to use this setting to ensure no
47
- incompatibilities are introduced.
47
+ The Library Manager submission-specific rules are enabled via ` --library-manager submit ` . Even if your library isn't yet
48
+ ready to be added to Library Manager, it's a good idea to use this setting to ensure no incompatibilities are
49
+ introduced.
48
50
49
51
Once your library is in the Library Manager index, each release is automatically picked up and made available to the
50
- Arduino community. Releases are also subjected to special checks, which must pass for it to be added to the index. The
51
- command ` arduino-lint --library-manager update ` will tell you whether your library will pass these checks .
52
+ Arduino community. Releases are also subject to special rules. The command ` arduino-lint --library-manager update ` will
53
+ tell you whether your library is compliant with these rules .
52
54
53
55
### Integration
54
56
55
57
The ` --format ` flag configures the format of ** arduino-lint** 's output. The default ` --format text ` setting provides
56
58
human readable output. For automation or integration with other tools, the machine readable output provided by
57
- ` --format json ` may be more convenient. This setting exposes all the details of the checks that are run .
59
+ ` --format json ` may be more convenient. This setting exposes every detail of the rules that were applied .
58
60
59
61
The ` --report-file ` flag causes ** arduino-lint** to write the JSON output to the specified file.
60
62
@@ -71,14 +73,15 @@ Additional configuration options intended for internal use or development can be
71
73
## Continuous integration
72
74
73
75
** arduino-lint** would be a great addition to your
74
- [ continuous integration] ( https://en.wikipedia.org/wiki/Continuous_integration ) system. Running the checks after each
75
- change to the project will allow you to identify any problems that were introduced.
76
+ [ continuous integration] ( https://en.wikipedia.org/wiki/Continuous_integration ) system. Running the tool after each
77
+ change to the project can allow you to identify any problems that were introduced.
76
78
77
- This is easily done by using the ` arduino/arduino-lint-action ` GitHub Actions action:
79
+ This is easily done by using the ` arduino/arduino-lint-action `
80
+ [ GitHub Actions] ( https://docs.github.com/en/free-pro-team@latest/actions ) action:
78
81
https://github.com/arduino/arduino-lint-action
79
82
80
- Add a simple workflow file to the repository of your Arduino project and the checks will automatically be run on every
81
- pull request and push.
83
+ Add [ a simple workflow file] ( https://github.com/arduino/arduino-lint-action#usage ) to the repository of your Arduino
84
+ project and GitHub will automatically run arduino-lint on every pull request and push.
82
85
83
86
## Support and feedback
84
87
0 commit comments