From 152e7a39250b6e98eb33aacad5a53e7da1aae31a Mon Sep 17 00:00:00 2001 From: per1234 Date: Wed, 2 Jun 2021 04:32:54 -0700 Subject: [PATCH] [skip changelog] Specify that `includes` field items should be in library The library.properties `includes` field specifies a custom list of files to be added to the sketch by the IDE as `#include` directives. Library authors sometimes add filenames from library dependencies to this field. However, that doesn't make any sense because all Arduino development software versions with support for the `includes` field have also had support for resolution of the dependencies of libraries, meaning that there is no need for these `#include` directives to be placed in the sketch. For this reason, Arduino Lint rule LP052 ("library.properties includes field item(s) not found in library.") was configured as an error when the tool is in the default "specification" compliance mode. Since the required rules in this mode are intended to match the official Arduino Library Specification, it is important that mention be made in the `includes` field that it should contain files of the library itself. Since this requirement is fairly common sense, and the format of the library.properties fields documentation somewhat constraining, I attempted to document it with minimal verbosity. --- docs/library-specification.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/library-specification.md b/docs/library-specification.md index 09837e53722..c81508c2fbe 100644 --- a/docs/library-specification.md +++ b/docs/library-specification.md @@ -79,9 +79,9 @@ otherwise below, **all fields are required**. The available fields are: files in the linker command directly, all .o files are saved into a .a file, which is then included in the linker command. [1.5 format library folder structure](#layout-of-folders-and-files) is required. -- **includes** - **(available from Arduino IDE 1.6.10)** (optional) a comma separated list of files to be added to the - sketch as `#include <...>` lines. This property is used with the "Include library" command in the Arduino IDE. If the - `includes` property is missing, all the header files (.h) on the root source folder are included. +- **includes** - **(available from Arduino IDE 1.6.10)** (optional) a comma separated list of files of the library to be + added to the sketch as `#include <...>` lines. This property is used with the "Include library" command in the Arduino + IDE. If the `includes` property is missing, all the header files (.h) on the root source folder are included. - **precompiled** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) enables support for .a (archive) and .so (shared object) files. See the ["Precompiled binaries"](#precompiled-binaries) section for documentation of the required location in the library for these files. The static library should be linked as an