Posts | Comments

Planet Arduino

Archive for the ‘Arduino Lint’ Category

Arduino Libraries Submissions process update

Arduino library submissions have a new, easier and more transparent workflow.

Libraries are one of the pillars of the Arduino ecosystem. At time of writing, more than 3,780 open source libraries are available to perform any kind of task. This includes communication with external components and using algorithms for data processing. Such a variety of shared building blocks helps achieve things quickly without the need to write low-level code.

Beyond the official libraries maintained by the Arduino team, most are contributed by the community. Anyone can submit a new library for inclusion, provided it meets the specification and passes the Arduino Lint checks.

Note: Did you know you can run the tool locally to check the compliance status of your current libraries?

A new Arduino library submissions process

We’re happy to announce that the submission process for community libraries has been refactored. The goal is making it leaner, more automated and more transparent. Previously you would open an issue on the Arduino IDE repository for the Arduino team to handle the request manually. Instead, we’ve now established an official GitHub repository containing the library registry.

Submitting a new library is now as simple as opening a pull request to that repository. Then you add the URL of the library’s repository to the list. A bot performs automated checks and, when passed, the request will be merged immediately. Within one day, the new library will be listed in the Arduino library directory. It’ll also be made available within the IDE, the Arduino CLI command line tool and the Web Editor. The Arduino team will still be monitoring the process in order to fight abuses and to provide assistance.

After a library is indexed, new versions are automatically detected and published (if compliant). So nothing changes for existing libraries and no action is required. See the repository documentation for more details about the new process and join the discussion in the forum to provide your feedback.

Subscribe to the Arduino newsletter so you don’t miss any other exciting developments!

The post New workflow for Arduino library submissions appeared first on Arduino Blog.

This article was written by Per Tillisch, Tooling Team SW Engineer at Arduino

The Arduino team created a tool to check Arduino projects for common problems. Arduino Lint runs over 175 checks on your sketches, libraries, and boards platforms which cover specification compliance, Library Manager submission requirements, and best practices.

Arduino Lint

Arduino Lint is an easy to use, yet powerful, command line tool. Its focus is on the structure, metadata, and configuration of Arduino projects, rather than the code.

Getting started

Follow the installation instructions to get ready to use Arduino Lint: https://arduino.github.io/arduino-lint/latest/installation/

Now you only need to open a terminal at your project folder and run the command: arduino-lint

This will automatically detect the project type and check it against the relevant rules.

The default configuration of Arduino Lint provides for the most common use cases, while offering the option to change settings via command line flags.

Configuration

Compliance setting

The –compliance flag allows you to configure the strictness of the applied rules. The three compliance level values accepted by this flag are:

  • permissive – failure will occur only when severe rule violations are found. Although a project that passes at the permissive setting will work with the current Arduino development software versions, it may not be fully specification-compliant, risking incompatibility or a poor experience for the users.
  • specification –  the default setting, enforces compliance with the official Arduino project specifications (sketch, library, platform).
  • strict – enforces best practices, above and beyond the minimum requirements for specification compliance. Use this setting to ensure the best experience for the users of the project.

Library Manager setting

Arduino Library Manager is the best way to provide installation and updates of Arduino libraries. In order to be accepted for inclusion in Library Manager, a library is required to meet some requirements.

Arduino Lint provides checks for these requirements as well, controlled by the –library-manager flag.

The Library Manager submission-specific rules are enabled via –library-manager submit.

Even if your library isn’t yet ready to be added to Library Manager, it’s a good idea to use this setting to ensure no incompatibilities are introduced.

Once your library is in the Library Manager index, each release is automatically picked up and made available to the Arduino community. Releases are also subject to special rules. The command arduino-lint –library-manager update will tell you whether your library is compliant with these rules.

Integration

The –format flag configures the format of arduino-lint’s output. The default –format text setting provides human readable output. For automation or integration with other tools, the machine readable output provided by –format json may be more convenient. This setting exposes every detail of the rules that were applied.

The –report-file flag causes arduino-lint to write the JSON output to the specified file.

Continuous integration

Arduino Lint would be a great addition to your continuous integration system. Running the tool after each change to the project can allow you to identify any problems that were introduced.

This is easily done by using the arduino/arduino-lint-action GitHub Actions action: https://github.com/arduino/arduino-lint-action

Add a simple workflow file to the repository of your Arduino project and GitHub will automatically run Arduino Lint on every pull request and push.

Give it a try!

Will your project get a passing grade from Arduino Lint? There’s only one way to find out…

Support and feedback

You can discuss or get assistance with using Arduino Lint on the Arduino Forum.

Feedback is welcome! Please submit feature requests or bug reports to the issue trackers:



  • Newsletter

    Sign up for the PlanetArduino Newsletter, which delivers the most popular articles via e-mail to your inbox every week. Just fill in the information below and submit.

  • Like Us on Facebook