Skip to content

Commit b8d8a9c

Browse files
authored
[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.
1 parent 7eb9c57 commit b8d8a9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: docs/library-specification.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ otherwise below, **all fields are required**. The available fields are:
7979
<!-- prettier-ignore -->
8080
files in the linker command directly, all .o files are saved into a .a file, which is then included in the linker
8181
command. [1.5 format library folder structure](#layout-of-folders-and-files) is required.
82-
- **includes** - **(available from Arduino IDE 1.6.10)** (optional) a comma separated list of files to be added to the
83-
sketch as `#include <...>` lines. This property is used with the "Include library" command in the Arduino IDE. If the
84-
`includes` property is missing, all the header files (.h) on the root source folder are included.
82+
- **includes** - **(available from Arduino IDE 1.6.10)** (optional) a comma separated list of files of the library to be
83+
added to the sketch as `#include <...>` lines. This property is used with the "Include library" command in the Arduino
84+
IDE. If the `includes` property is missing, all the header files (.h) on the root source folder are included.
8585
- **precompiled** - **(available from Arduino IDE 1.8.6/arduino-builder 1.4.0)** (optional) enables support for .a
8686
(archive) and .so (shared object) files. See the ["Precompiled binaries"](#precompiled-binaries) section for
8787
documentation of the required location in the library for these files. The static library should be linked as an

0 commit comments

Comments
 (0)