Skip to content

Commit 5eae124

Browse files
authored
Merge pull request #1 from arduino/development
Initial set up
2 parents 920f513 + 71a2f58 commit 5eae124

17 files changed

+1067
-0
lines changed

Diff for: .codespellrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# See: https://github.com/codespell-project/codespell#using-a-config-file
2+
[codespell]
3+
builtin = clear,informal,en-GB_to_en-US
4+
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
5+
ignore-words-list = ,
6+
check-filenames =
7+
check-hidden =
8+
skip = ./.git

Diff for: .ecrc

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"Exclude": ["LICENSE.txt"]
3+
}

Diff for: .editorconfig

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# See: https://editorconfig.org/
2+
# The formatting style defined in this file is the official standardized style to be used in all Arduino projects and
3+
# should not be modified.
4+
# Note: indent style for each file type is defined even when it matches the universal config in order to make it clear
5+
# that this type has an official style.
6+
7+
[*]
8+
charset = utf-8
9+
end_of_line = lf
10+
indent_size = 2
11+
indent_style = space
12+
insert_final_newline = true
13+
trim_trailing_whitespace = true
14+
15+
[*.{adoc,asc,asciidoc}]
16+
indent_size = 2
17+
indent_style = space
18+
19+
[*.{bash,sh}]
20+
indent_size = 2
21+
indent_style = space
22+
23+
[*.{c,cc,cp,cpp,cxx,h,hh,hpp,hxx,ii,inl,ino,ixx,pde,tpl,tpp,txx}]
24+
indent_size = 2
25+
indent_style = space
26+
27+
[*.go]
28+
indent_style = tab
29+
30+
[*.java]
31+
indent_size = 2
32+
indent_style = space
33+
34+
[*.{js,jsx,json,jsonc,json5,ts,tsx}]
35+
indent_size = 2
36+
indent_style = space
37+
38+
[*.{md,mdx,mkdn,mdown,markdown}]
39+
indent_size = unset
40+
indent_style = space
41+
42+
[*.py]
43+
indent_size = 4
44+
indent_style = space
45+
46+
[*.svg]
47+
indent_size = 2
48+
indent_style = space
49+
50+
[*.{yaml,yml}]
51+
indent_size = 2
52+
indent_style = space

Diff for: .github/workflows/check-general-formatting.yml

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Check General Formatting
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
pull_request:
7+
schedule:
8+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to tools.
9+
- cron: "0 8 * * TUE"
10+
workflow_dispatch:
11+
repository_dispatch:
12+
13+
jobs:
14+
check:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v2
20+
21+
- name: Check formatting
22+
uses: editorconfig-checker/[email protected]

Diff for: .github/workflows/check-license.yml

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Check License
2+
3+
env:
4+
EXPECTED_LICENSE_FILENAME: LICENSE.txt
5+
# SPDX identifier: https://spdx.org/licenses/
6+
EXPECTED_LICENSE_TYPE: CC0-1.0
7+
8+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
9+
on:
10+
push:
11+
paths:
12+
- ".github/workflows/check-license.yml"
13+
# See: https://github.com/licensee/licensee/blob/master/docs/what-we-look-at.md#detecting-the-license-file
14+
- "[cC][oO][pP][yY][iI][nN][gG]*"
15+
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
16+
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
17+
- "[oO][fF][lL]*"
18+
- "[pP][aA][tT][eE][nN][tT][sS]*"
19+
pull_request:
20+
paths:
21+
- ".github/workflows/check-license.yml"
22+
- "[cC][oO][pP][yY][iI][nN][gG]*"
23+
- "[cC][oO][pP][yY][rR][iI][gG][hH][tH]*"
24+
- "[lL][iI][cC][eE][nN][cCsS][eE]*"
25+
- "[oO][fF][lL]*"
26+
- "[pP][aA][tT][eE][nN][tT][sS]*"
27+
workflow_dispatch:
28+
repository_dispatch:
29+
30+
jobs:
31+
check-license:
32+
runs-on: ubuntu-latest
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@v2
37+
38+
- name: Install Ruby
39+
uses: ruby/setup-ruby@v1
40+
with:
41+
ruby-version: ruby # Install latest version
42+
43+
- name: Install licensee
44+
run: gem install licensee
45+
46+
- name: Check license file
47+
run: |
48+
# See: https://github.com/licensee/licensee
49+
LICENSEE_OUTPUT="$(licensee detect --json --confidence=100)"
50+
51+
DETECTED_LICENSE_FILE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].filename | tr --delete '\r')"
52+
echo "Detected license file: $DETECTED_LICENSE_FILE"
53+
if [ "$DETECTED_LICENSE_FILE" != "\"$EXPECTED_LICENSE_FILENAME\"" ]; then
54+
echo "ERROR: detected license file doesn't match expected: $EXPECTED_LICENSE_FILENAME"
55+
exit 1
56+
fi
57+
58+
DETECTED_LICENSE_TYPE="$(echo "$LICENSEE_OUTPUT" | jq .matched_files[0].matched_license | tr --delete '\r')"
59+
echo "Detected license type: $DETECTED_LICENSE_TYPE"
60+
if [ "$DETECTED_LICENSE_TYPE" != "\"$EXPECTED_LICENSE_TYPE\"" ]; then
61+
echo "ERROR: detected license type doesn't match expected $EXPECTED_LICENSE_TYPE"
62+
exit 1
63+
fi

Diff for: .github/workflows/check-markdown.yml

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Check Markdown
2+
3+
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows
4+
on:
5+
push:
6+
paths:
7+
- ".github/workflows/check-markdown.yml"
8+
- ".markdown-link-check.json"
9+
- "**/.markdownlint*"
10+
- "**.md"
11+
- "**.mdx"
12+
- "**.mkdn"
13+
- "**.mdown"
14+
- "**.markdown"
15+
pull_request:
16+
paths:
17+
- ".github/workflows/check-markdown.yml"
18+
- ".markdown-link-check.json"
19+
- "**/.markdownlint*"
20+
- "**.md"
21+
- "**.mdx"
22+
- "**.mkdn"
23+
- "**.mdown"
24+
- "**.markdown"
25+
schedule:
26+
# Run every Tuesday at 8 AM UTC to catch breakage caused by changes to markdownlint.
27+
- cron: "0 8 * * TUE"
28+
workflow_dispatch:
29+
repository_dispatch:
30+
31+
jobs:
32+
lint:
33+
runs-on: ubuntu-latest
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v2
38+
39+
- name: Initialize markdownlint-cli problem matcher
40+
uses: xt0rted/markdownlint-problem-matcher@v1
41+
42+
- name: Install markdownlint-cli
43+
run: sudo npm install --global markdownlint-cli
44+
45+
- name: Run markdownlint
46+
run: markdownlint "**/*.md"
47+
48+
links:
49+
runs-on: ubuntu-latest
50+
51+
steps:
52+
- name: Checkout repository
53+
uses: actions/checkout@v2
54+
55+
- name: Determine whether only modified files should be checked
56+
id: check-modified
57+
if: github.event_name == 'pull_request'
58+
run: |
59+
echo "::set-output name=value::yes"
60+
61+
- name: Check links
62+
uses: gaurav-nelson/github-action-markdown-link-check@v1
63+
with:
64+
config-file: .markdown-link-check.json
65+
use-quiet-mode: "yes"
66+
check-modified-files-only: ${{ steps.check-modified.outputs.value }}
67+
base-branch: ${{ github.base_ref }}

0 commit comments

Comments
 (0)