Unverified Commit b8d8a9ca authored by per1234's avatar per1234 Committed by GitHub

[skip changelog] Specify that `includes` field items should be in library (#1305)

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.
parent 7eb9c57a
......@@ -79,9 +79,9 @@ otherwise below, **all fields are required**. The available fields are:
<!-- prettier-ignore -->
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment