Skip to content

Commit d8d3c77

Browse files
per1234Roberto Sora
and
Roberto Sora
authored
[skip changelog]Fix typos and formatting in the documentation (#907)
* Fix typos in documentation * Improve formatting of documentation * Use correct case for Arduino CLI name in documentation Co-authored-by: Roberto Sora <r.sora@arduino.cc> Co-authored-by: Roberto Sora <r.sora@arduino.cc>
1 parent 495966e commit d8d3c77

12 files changed

+100
-91
lines changed

Diff for: docs/CONTRIBUTING.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ From the project folder root, just run:
5050
task build
5151
```
5252

53-
The project uses Go modules so dependencies will be downloaded automatically; at the end of the build, you should find
53+
The project uses Go modules so dependencies will be downloaded automatically. At the end of the build, you should find
5454
an `arduino-cli` executable in the same folder.
5555

5656
## Running the tests
@@ -159,11 +159,11 @@ To keep the configurations tidy and in order we use [Prettier][prettier-website]
159159
in the project. Keeping and enforcing a formatting standard helps everyone make small PRs and avoids the introduction of
160160
formatting changes made by unconfigured editors.
161161

162-
There are several ways to run Prettier, if you're using Visual Studio Code you can easily use the [`prettier-vscode`
162+
There are several ways to run Prettier. If you're using Visual Studio Code you can easily use the [`prettier-vscode`
163163
extension][prettier-vscode-extension] to automatically format as you write.
164164

165-
Otherwise you can use the following tasks, to do so you'll need to install `npm` if not already installed. Check the
166-
[official documentation][npm-install-docs] to know how to install `npm` for your platform.
165+
Otherwise you can use the following tasks. To do so you'll need to install `npm` if not already installed. Check the
166+
[official documentation][npm-install-docs] to learn how to install `npm` for your platform.
167167

168168
To check if the files are correctly formatted run:
169169

@@ -177,7 +177,7 @@ If the output tells you that some files are not formatted correctly run:
177177
task config:format
178178
```
179179

180-
When opening a new Pull Requests checks are automatically run to verify that configuration files are correctly
180+
When opening a new Pull Request, checks are automatically run to verify that configuration files are correctly
181181
formatted. In case of failures we might ask you to update the PR with correct formatting.
182182

183183
## Working on docs
@@ -257,11 +257,11 @@ To keep the documentation tidy and in order we use [Prettier][prettier-website]
257257
files in the project. Keeping and enforcing a formatting standard helps everyone make small PRs and avoids the
258258
introduction of formatting changes made by unconfigured editors.
259259

260-
There are several ways to run Prettier, if you're using Visual Studio Code you can easily use the [`prettier-vscode`
260+
There are several ways to run Prettier. If you're using Visual Studio Code you can easily use the [`prettier-vscode`
261261
extension][prettier-vscode-extension] to automatically format as you write.
262262

263-
Otherwise you can use the following tasks, to do so you'll need to install `npm` if not already installed. Check the
264-
[official documentation][npm-install-docs] to know how to install `npm` for your platform.
263+
Otherwise you can use the following tasks. To do so you'll need to install `npm` if not already installed. Check the
264+
[official documentation][npm-install-docs] to learn how to install `npm` for your platform.
265265

266266
To check if the files are correctly formatted run:
267267

@@ -275,15 +275,15 @@ If the output tells you that some files are not formatted correctly run:
275275
task docs:format
276276
```
277277

278-
When opening a new Pull Requests checks are automatically run to verify that documentation is correctly formatted. In
278+
When opening a new Pull Request, checks are automatically run to verify that documentation is correctly formatted. In
279279
case of failures we might ask you to update the PR with correct formatting.
280280

281281
### Docs automation
282282

283283
In order to avoid unwanted changes to the public website hosting the Arduino CLI documentation, only Mike is allowed to
284284
push changes to the `gh-pages` branch, and this only happens from within the CI, in a workflow named [publish-docs][11].
285285

286-
The CI is responsible for guessing which version of the Arduino CLI we're building docs for, so that generated contents
286+
The CI is responsible for guessing which version of the Arduino CLI we're building docs for, so that generated content
287287
will be stored in the appropriate section of the documentation website. Because this guessing might be fairly complex,
288288
the logic is implemented in a Python script called [`build.py`][12]. The script will determine the version of the
289289
Arduino CLI that was modified in the current commit (either `dev` or an official, numbered release) and whether the
@@ -295,8 +295,8 @@ In order to support i18n in the CLI, any messages that are intended to be transl
295295
`i18n.Tr`. This call allows us to build a catalog of translatable strings, replacing the reference string at runtime
296296
with the localized value.
297297

298-
Adding or modifying these messages requires an i18n update, as this process creates the reference catalog that are
299-
shared with translators. For that reason, the `task check` command will fail if the catalog was not updated to sync with
298+
Adding or modifying these messages requires an i18n update, as this process creates the reference catalog that is shared
299+
with translators. For that reason, the `task check` command will fail if the catalog was not updated to sync with
300300
changes to the source code.
301301

302302
To update the catalog, execute the following command and commit the changes.

Diff for: docs/FAQ.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Additional board options have to be separated by commas (instead of colon):
1919

2020
## Where is the Serial Monitor?
2121

22-
Being this a command line tool we believe it's up to the user to choose their preferred way of interacting with the
22+
This being a command line tool, we believe it's up to the user to choose their preferred way of interacting with the
2323
serial connection. If we were to integrate it into the CLI we'd end up putting a tool inside a tool, and this would be
2424
something that we're trying to avoid.
2525

Diff for: docs/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Follow the [Getting started guide] to see how to use the most common CLI command
1111

1212
## Using the gRPC interface
1313

14-
The [client_example] folder contains a sample program that shows how to use gRPC interface of the CLI. Available
14+
The [client_example] folder contains a sample program that shows how to use the gRPC interface of the CLI. Available
1515
services and messages are detailed in the [gRPC reference] pages.
1616

1717
[installation]: installation.md

Diff for: docs/integration-options.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,16 @@ programmatically - think about automation pipelines or a [CI][continuous integra
2525
system. There are some niceties to observe when you write software that’s supposed to be easy to run when unattended and
2626
one in particular is the ability to run without a configuration file. This is possible because every configuration
2727
option you find in the arduino-cli.yaml configuration file can be provided either through a command line flag or by
28-
setting an environment variable. To give an example, the following commands are all equivalent and will proceed fetching
29-
the unstable package index that can be used to work with experimental versions of cores:
28+
setting an environment variable. To give an example, the following commands are all equivalent and will fetch the
29+
package index used to work with unstable experimental versions of Arduino's cores:
3030

3131
![configuration methods screenshot][]
3232

3333
See the [configuration documentation] for details about Arduino CLI's configuration system.
3434

3535
Consistent with the previous paragraph, when it comes to providing output the Arduino CLI aims to be user friendly but
3636
also slightly verbose, something that doesn’t play well with robots. This is why we added an option to provide output
37-
that’s easy to parse, for example the following figure shows what getting the software version in [JSON] format looks
37+
that’s easy to parse. For example, the following figure shows what getting the software version in [JSON] format looks
3838
like.
3939

4040
![JSON output screenshot][]
@@ -70,15 +70,15 @@ Arduino CLI is written in [Golang] and the code is organized in a way that makes
7070
including the modules you need in another Golang application at compile time. Both the first and second pillars rely on
7171
a common Golang API, a set of functions that abstract all the functionalities offered by the Arduino CLI, so that when
7272
we provide a fix or a new feature, they are automatically available to both the command line and gRPC interfaces. The
73-
source modules implementing this API can be imported in other Golang programs to embed a full fledged Arduino CLI. For
73+
source modules implementing this API can be imported in other Golang programs to embed a full-fledged Arduino CLI. For
7474
example, this is how some backend services powering [Arduino Create] can compile sketches and manage libraries. Just to
7575
give you a taste of what it means to embed the Arduino CLI, here is how to search for a core using the API:
7676

7777
![Go library interface screenshot][]
7878

79-
Embedding the Arduino CLI is limited to Golang applications and requires a deep knowledge of its internals; for the
80-
average use case the gRPC interface might be a better alternative, nevertheless this remains a valid option that we use
81-
and provide support for.
79+
Embedding the Arduino CLI is limited to Golang applications and requires a deep knowledge of its internals. For the
80+
average use case, the gRPC interface might be a better alternative. Nevertheless, this remains a valid option that we
81+
use and provide support for.
8282

8383
## Conclusions
8484

Diff for: docs/library-specification.md

+16-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
This is the specification for the Arduino library format, to be used with Arduino IDE 1.5.x onwards.
22

33
- rev.1 has been implemented starting with Arduino IDE version 1.5.3 (now superseded by rev.2)
4-
- rev.2 will be implemented starting from version Arduino IDE 1.5.6
5-
- rev.2.1 will be implemented starting from version Arduino IDE 1.6.10
6-
- rev.2.2 will be implemented starting from version Arduino IDE 1.8.10
4+
- rev.2 will be implemented starting from Arduino IDE version 1.5.6
5+
- rev.2.1 will be implemented starting from Arduino IDE version 1.6.10
6+
- rev.2.2 will be implemented starting from Arduino IDE version 1.8.10
77

88
This new library format is intended to be used in tandem with **Library Manager**, available since Arduino IDE 1.6.2.
99
The Library Manager allows users to automatically download and install libraries needed in their projects, with an easy
10-
to use graphic interface in the [Arduino IDE](https://www.arduino.cc/en/guide/libraries#toc3)/Pro IDE and
10+
to use graphical interface in the [Arduino IDE](https://www.arduino.cc/en/guide/libraries#toc3)/Pro IDE and
1111
[Arduino Web Editor](https://create.arduino.cc/projecthub/Arduino_Genuino/getting-started-with-arduino-web-editor-on-various-platforms-4b3e4a#toc-libraries-and-the-arduino-web-editor-11)
1212
as well as [`arduino-cli lib`](commands/arduino-cli_lib.md).
1313

@@ -46,7 +46,7 @@ otherwise below, **all fields are required**. The available fields are:
4646
are now reserved for official Arduino libraries.
4747
- **version** - version of the library. Version should be [semver](http://semver.org/) compliant. 1.2.0 is correct; 1.2
4848
is accepted; r5, 003, 1.1c are invalid
49-
- **author** - name/nickname of the authors and their email addresses (not mandatory) separated by comma ","
49+
- **author** - name/nickname of the authors and their email addresses (not mandatory) separated by comma (,)
5050
- **maintainer** - name and email of the maintainer
5151
- **sentence** - a sentence explaining the purpose of the library
5252
- **paragraph** - a longer description of the library. The value of **sentence** will be prepended to this, so you
@@ -125,7 +125,8 @@ numbers, spaces ( ), underscores (\_), dots (.) and dashes (-). The maximum leng
125125

126126
#### Source code
127127

128-
For 1.5.x+-only libraries, the source code resides in the **src** folder. For example:
128+
For libraries intended to be used with Arduino IDE 1.5.x+ only, the source code resides in the **src** folder. For
129+
example:
129130

130131
Servo/src/Servo.h
131132
Servo/src/Servo.cpp
@@ -149,7 +150,7 @@ from the **library root folder** and the **utility** folder, for example:
149150
Servo/utility/ServoTimers.h
150151
Servo/utility/ServoTimers.cpp
151152

152-
This will allow existing 1.0 format libraries to compile under Arduino IDE 1.5.x+ as well and vice-versa. If a library
153+
This will allow existing 1.0 format libraries to compile under Arduino IDE 1.5.x+ as well, and vice-versa. If a library
153154
only needs to run on Arduino IDE 1.5.x+, we recommend placing all source code in the src/ folder. If a library requires
154155
recursive compilation of nested source folders, its code must be in the src/ folder (since Arduino IDE 1.0.x doesn’t
155156
support recursive compilation, backwards compatibility wouldn’t be possible anyway).
@@ -193,8 +194,8 @@ Servo/src/cortex-m4/fpv4-sp-d16-softfp/libServo.a
193194

194195
#### Library Examples
195196

196-
Library examples must be placed in the **examples** folder. Note that the **examples** folder must be written exactly
197-
like that (with lower case letters).
197+
Library examples must be placed in the **examples** folder. Note that the **examples** folder name must be written
198+
exactly like that (with lower case letters).
198199

199200
Servo/examples/...
200201

@@ -238,7 +239,7 @@ doSomething KEYWORD2
238239
# Constants (LITERAL1)
239240
```
240241

241-
This file would cause the Arduino IDE to highlight `Test` as a DataType, and `doSomething` as a method / function.
242+
This file would cause the Arduino IDE to highlight `Test` as a data type, and `doSomething` as a method / function.
242243

243244
#### keywords.txt format
244245

@@ -311,8 +312,11 @@ A hypothetical library named "Servo" that adheres to the specification follows:
311312
Libraries placed in the `libraries` subfolder of the sketchbook folder (AKA "user directory") will be made available for
312313
all boards, which may include multiple different processor architectures. To provide architecture-specific code or
313314
optimizations, library authors can use the `ARDUINO_ARCH_XXX` preprocessor macro (`#define`), where XXX is the name of
314-
the architecture (as determined by the name of the folder containing it), e.g. `ARDUINO_ARCH_AVR` will be defined when
315-
compiling for AVR-based boards. For example,
315+
the architecture (as determined by the name of the
316+
[architecture folder](platform-specification.md#hardware-folders-structure) of the board's platform). For example,
317+
`ARDUINO_ARCH_AVR` will be defined when compiling for AVR-based boards.
318+
319+
An example:
316320

317321
#if defined(ARDUINO_ARCH_AVR)
318322
// AVR-specific code

Diff for: docs/package_index_json-specification.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ or
2222

2323
`package_example.com_avr_boards_index.json`
2424

25-
The index URL is periodically checked for updates so expect a constant flow of downloads (proportional to the number of
25+
The index URL is periodically checked for updates, so expect a constant flow of downloads (proportional to the number of
2626
active users).
2727

2828
## JSON Index file contents
@@ -146,7 +146,7 @@ array. In the example above `avr-gcc` comes with builds for:
146146

147147
The IDE will take care to install the right flavour based on the `host` value, or fail if a needed flavour is
148148
missing.<br> Note that this information is not used to select the toolchain during compilation. If you want this
149-
specific version to be used, you should use the notation {runtime.tools.TOOLNAME-VERSION.path} in the platform.txt.
149+
specific version to be used, you should use the notation `{runtime.tools.TOOLNAME-VERSION.path}` in the platform.txt.
150150

151151
The other fields are:
152152

@@ -161,13 +161,13 @@ The other fields are:
161161

162162
##### How a tool's path is determined in platform.txt
163163

164-
When the IDE needs a tool it downloads the corresponding archive file and unpacks the content into a private folder that
165-
can be referenced from `platform.txt` using one of the following properties:
164+
When the IDE needs a tool, it downloads the corresponding archive file and unpacks the content into a private folder
165+
that can be referenced from `platform.txt` using one of the following properties:
166166

167167
- `{runtime.tools.TOOLNAME-VERSION.path}`
168168
- `{runtime.tools.TOOLNAME.path}`
169169

170-
For example to obtain the avr-gcc 4.8.1 folder we can use `{runtime.tools.avr-gcc-4.8.1-arduino5.path}` or
170+
For example, to obtain the avr-gcc 4.8.1 folder we can use `{runtime.tools.avr-gcc-4.8.1-arduino5.path}` or
171171
`{runtime.tools.avr-gcc.path}`.
172172

173173
### Platforms definitions
@@ -223,7 +223,7 @@ The `version` field is validated by both Arduino IDE and [JSemVer](https://githu
223223
rules Arduino IDE follows for parsing versions
224224
([source](https://github.com/arduino/Arduino/blob/master/arduino-core/src/cc/arduino/contributions/VersionHelper.java)):
225225

226-
- Split the version at the - character and continue with the first part.
226+
- Split the version at the `-` character and continue with the first part.
227227
- If there are no dots (`.`), parse `version` as an integer and form a Version from that integer using
228228
`Version.forIntegers`
229229
- If there is one dot, split `version` into two, parse each part as an integer, and form a Version from those integers

0 commit comments

Comments
 (0)