11# How to contribute
22
3- First of all, thanks for contributing!
3+ First of all, thanks for contributing! This document provides some basic guidelines for contributing to this repository.
44
5- This document provides some basic guidelines for contributing to this repository. To propose improvements or fix a bug,
6- feel free to submit a PR.
5+ There are several ways you can get involved:
76
8- ## Legal requirements
7+ | Type of contribution | Contribution method |
8+ | ------------------------------------------------- | ------------------------------------------------------- |
9+ | - Support request<br />- Question<br />- Discussion | Post on the [ Arduino Forum] [ forum ] |
10+ | - Bug report<br />- Feature request | Issue report (read the [ issue guidelines] [ issues ] ) |
11+ | Beta testing | Try out the [ nightly build] [ nightly ] |
12+ | - Bug fix<br />- Enhancement | Pull Request (read the [ pull request guidelines] [ prs ] ) |
13+ | Translations for Arduino CLI | [ transifex] [ translate ] |
14+ | Monetary | - [ Donate] [ donate ] <br />- [ Buy official products] [ store ] |
915
10- Before we can accept your contributions you have to sign the [ Contributor License Agreement] [ 0 ]
16+ ## Issue Reports
17+
18+ Do you need help or have a question about using Arduino CLI? Support requests should be made to Arduino CLI's dedicated
19+ board in the [ Arduino forum] [ forum ] .
20+
21+ High quality bug reports and feature requests are valuable contributions to the Arduino CLI project.
22+
23+ ### Before reporting an issue
24+
25+ - Give the [ nightly build] [ nightly ] a test drive to see if your issue was already resolved.
26+ - Search [ existing pull requests and issues] [ issue-tracker ] to see if it was already reported. If you have additional
27+ information to provide about an existing issue, please comment there. You can use the [ Reactions feature] [ reactions ]
28+ if you only want to express support.
29+
30+ ### Qualities of an excellent report
31+
32+ - The issue title should be descriptive. Vague titles make it difficult to understand the purpose of the issue, which
33+ might cause your issue to be overlooked.
34+ - Provide a full set of steps necessary to reproduce the issue. Demonstration code or commands should be complete and
35+ simplified to the minimum necessary to reproduce the issue.
36+ - Be responsive. We may need you to provide additional information in order to investigate and resolve the issue.
37+ - If you find a solution to your problem, please comment on your issue report with an explanation of how you were able
38+ to fix it and close the issue.
1139
1240## Pull Requests
1341
42+ To propose improvements or fix a bug, feel free to submit a PR.
43+
44+ ### Legal requirements
45+
46+ Before we can accept your contributions you have to sign the [ Contributor License Agreement] [ 0 ]
47+
48+ ### Pull request checklist
49+
1450In order to ease code reviews and have your contributions merged faster, here is a list of items you can check before
1551submitting a PR:
1652
@@ -25,7 +61,7 @@ submitting a PR:
2561- Your PR must pass all CI tests before we will merge it. If you're seeing an error and don't think it's your fault, it
2662 may not be! The reviewer will help you if there are test failures that seem not related to the change you are making.
2763
28- ## Prerequisites
64+ ### Prerequisites
2965
3066To build the Arduino CLI from sources you need the following tools to be available in your local environment:
3167
@@ -42,7 +78,7 @@ If you're working on the gRPC interface you will also have to:
4278- download the [ protoc] [ 6 ] compiler
4379- run ` go get -u github.com/golang/protobuf/protoc-gen-go `
4480
45- ## Building the source code
81+ ### Building the source code
4682
4783From the project folder root, just run:
4884
@@ -53,7 +89,7 @@ task build
5389The project uses Go modules so dependencies will be downloaded automatically. At the end of the build, you should find
5490an ` arduino-cli ` executable in the same folder.
5591
56- ## Running the tests
92+ ### Running the tests
5793
5894There are several checks and test suites in place to ensure the code works as expected and is written in a way that's
5995consistent across the whole codebase. To avoid pushing changes that will cause the CI system to fail, you can run most
@@ -77,7 +113,7 @@ To run integration tests (these will take some time and require special setup, s
77113task test-integration
78114```
79115
80- ### Running only some tests
116+ #### Running only some tests
81117
82118By default, all tests from all go packages are run. To run only unit tests from one or more specific packages, you can
83119set the TARGETS environment variable, e.g.:
@@ -102,7 +138,7 @@ confidence that the code is working.
102138For these reasons, in addition to regular unit tests the project has a suite of integration tests that actually run
103139Arduino CLI in a different process and assess the options are correctly understood and the output is what we expect.
104140
105- #### Hardware requirements for running the full suite of integration tests:
141+ ##### Hardware requirements for running the full suite of integration tests:
106142
107143An Arduino board attached to a serial port. The board must:
108144
@@ -114,7 +150,7 @@ An Arduino board attached to a serial port. The board must:
114150Note that running the integration tests will result in a sketch being uploaded to every attached Arduino board meeting
115151the above requirements.
116152
117- #### Software requirements for running integration tests:
153+ ##### Software requirements for running integration tests:
118154
119155A working Python environment. Chances are that you already have Python installed in your system, if this is not the case
120156you can [ download] [ 3 ] the official distribution or use the package manager provided by your Operating System.
@@ -177,7 +213,7 @@ In case of linting errors you should be able to solve most of them by automatica
177213task python:format
178214```
179215
180- ### Configuration files formatting
216+ #### Configuration files formatting
181217
182218To keep the configurations tidy and in order we use [ Prettier] [ prettier-website ] to automatically format all YAML files
183219in the project. Keeping and enforcing a formatting standard helps everyone make small PRs and avoids the introduction of
@@ -204,12 +240,12 @@ task config:format
204240When opening a new Pull Request, checks are automatically run to verify that configuration files are correctly
205241formatted. In case of failures we might ask you to update the PR with correct formatting.
206242
207- ## Working on docs
243+ ### Working on docs
208244
209245Documentation is provided to final users in form of static HTML content generated from a tool called [ MkDocs] [ 9 ] and
210246hosted on [ GitHub Pages] [ 7 ] .
211247
212- ### Local development
248+ #### Local development
213249
214250Most of the documentation consists of static content written over several Markdown files under the ` docs ` folder at the
215251root of this git repository but some other content is dynamically generated from the CI pipelines - this is the case
@@ -239,14 +275,14 @@ task docs:serve
239275
240276If you don't see any error, hit http://127.0.0.1:8000 with your browser to navigate the generated docs.
241277
242- ### Docs publishing
278+ #### Docs publishing
243279
244280The present git repository has a special branch called ` gh-pages ` that contains the generated HTML code for the docs
245281website; every time a change is pushed to this special branch, GitHub automatically triggers a deployment to pull the
246282change and publish a new version of the website. Do not open Pull Requests to push changes to the ` gh-pages ` branch,
247283that will be done exclusively from the CI.
248284
249- ### Docs versioning
285+ #### Docs versioning
250286
251287In order to provide support for multiple Arduino CLI releases, Documentation is versioned so that visitors can select
252288which version of the documentation website should be displayed. Unfortunately this feature isn't provided by GitHub
@@ -275,7 +311,7 @@ few things for us:
275311> ** Note:** unless you're working on the generation process itself, you should never run Mike from a local environment,
276312> either directly or through the Task ` docs:publish ` . This might result in unwanted changes to the public website.
277313
278- ### Docs formatting
314+ #### Docs formatting
279315
280316To keep the documentation tidy and in order we use [ Prettier] [ prettier-website ] to automatically format all Markdown
281317files in the project. Keeping and enforcing a formatting standard helps everyone make small PRs and avoids the
@@ -302,7 +338,7 @@ task docs:format
302338When opening a new Pull Request, checks are automatically run to verify that documentation is correctly formatted. In
303339case of failures we might ask you to update the PR with correct formatting.
304340
305- ### Docs automation
341+ #### Docs automation
306342
307343In order to avoid unwanted changes to the public website hosting the Arduino CLI documentation, only Mike is allowed to
308344push changes to the ` gh-pages ` branch, and this only happens from within the CI, in a workflow named [ publish-docs] [ 11 ] .
@@ -313,7 +349,7 @@ the logic is implemented in a Python script called [`build.py`][12]. The script
313349Arduino CLI that was modified in the current commit (either ` dev ` or an official, numbered release) and whether the
314350redirect to the latest version that happens on the landing page should be updated or not.
315351
316- ## Internationalization (i18n)
352+ ### Internationalization (i18n)
317353
318354In order to support i18n in the CLI, any messages that are intended to be translated should be wrapped in a call to
319355` i18n.Tr ` . This call allows us to build a catalog of translatable strings, replacing the reference string at runtime
@@ -350,7 +386,7 @@ func main() {
350386}
351387```
352388
353- ## Additional settings
389+ ### Additional settings
354390
355391If you need to push a commit that's only shipping documentation changes or example files, thus a complete no-op for the
356392test suite, please start the commit message with the string ** [ skip ci] ** to skip the build and give that slot to
@@ -371,6 +407,15 @@ If your PR doesn't need to be included in the changelog, please start the commit
371407[ 10 ] : https://github.com/jimporter/mike
372408[ 11 ] : https://github.com/arduino/arduino-cli/blob/master/.github/workflows/publish-docs.yaml
373409[ 12 ] : https://github.com/arduino/arduino-cli/blob/master/docs/build.py
410+ [ forum ] : https://forum.arduino.cc/index.php?board=145.0
411+ [ issues ] : #issue-reports
412+ [ nightly ] : https://arduino.github.io/arduino-cli/latest/installation/#nightly-builds
413+ [ prs ] : #pull-requests
414+ [ translate ] : https://www.transifex.com/arduino-1/arduino-cli/
415+ [ donate ] : https://www.arduino.cc/en/Main/Contribute
416+ [ store ] : https://store.arduino.cc
417+ [ issue-tracker ] : https://github.com/arduino/arduino-cli/issues?q=
418+ [ reactions ] : https://github.com/blog/2119-add-reactions-to-pull-requests-issues-and-comments
374419[ prettier-website ] : https://prettier.io/
375420[ prettier-vscode-extension ] : https://github.com/prettier/prettier-vscode
376421[ npm-install-docs ] : https://docs.npmjs.com/downloading-and-installing-node-js-and-npm
0 commit comments