Skip to content

[skip changelog] Introduce linting and formatting for docs and config files #836

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jul 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dependabot/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ update_configs:
- match:
update_type: "security"
default_labels:
- "component/dependencies"
- "component/dependencies"
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ indent_size = 4
indent_style = space
indent_size = 4

[*.yml,*.tmpl]
[*.yml,*.yaml,*.tmpl]
indent_style = space
indent_size = 2

Expand Down
7 changes: 3 additions & 4 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,25 @@
---
name: 🐛 Bug Report
about: If something isn't working as expected 🤔.

---

## Bug Report

### Current behavior
<!-- Paste the full command you run -->

<!-- Paste the full command you run -->

<!-- Add a clear and concise description of the behavior. -->


### Expected behavior
<!-- Add a clear and concise description of what you expected to happen. -->

<!-- Add a clear and concise description of what you expected to happen. -->

### Environment

- CLI version (output of `arduino-cli version`):
- OS and platform:

### Additional context

<!-- (Optional) Add any other context about the problem here. -->
17 changes: 6 additions & 11 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,31 +1,26 @@
**Please check if the PR fulfills these requirements**
- [ ] The PR has no duplicates (please search among the [Pull Requests](https://github.com/arduino/arduino-cli/pulls) before creating one)

- [ ] The PR has no duplicates (please search among the [Pull Requests](https://github.com/arduino/arduino-cli/pulls)
before creating one)
- [ ] The PR follows [our contributing guidelines](https://arduino.github.io/arduino-cli/CONTRIBUTING/#pull-requests)
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)


* **What kind of change does this PR introduce?**
<!-- Bug fix, feature, docs update, ... -->


* **What is the current behavior?**
- **What is the current behavior?**
<!-- You can also link to an open issue here -->


* **What is the new behavior?**
<!-- if this is a feature change -->



* **Does this PR introduce a breaking change?**
- **Does this PR introduce a breaking change?**
<!-- What changes might users need to make in their workflow or application due to this PR? -->



* **Other information**:
<!-- Any additional information that could help the review process -->


---

See [how to contribute](https://arduino.github.io/arduino-cli/CONTRIBUTING/)
2 changes: 1 addition & 1 deletion .github/workflows/arduino-stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: arduino-stats
on:
schedule:
# run every day at 12:30:00
- cron: '30 12 * * *'
- cron: "30 12 * * *"

jobs:
push-stats:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,27 @@ on:
pull_request:
paths:
# existing docs
- 'docs/**'
- "docs/**"
# changes to the cli reference generator
- 'docsgen/**'
- "docsgen/**"
# potential changes to commands documentation
- 'cli/**'
- "cli/**"
# potential changes to gRPC documentation
- 'rpc/**'
- "rpc/**"
# changes to the workflow itself
- '.github/workflows/docs.yaml'
- ".github/workflows/docs.yaml"
push:
branches:
- master
# release branches have names like 0.8.x, 0.9.x, ...
- '[0-9]+.[0-9]+.x'
- "[0-9]+.[0-9]+.x"
# At this day, GitHub doesn't support YAML anchors, d'oh!
paths:
- 'docs/**'
- 'docsgen/**'
- 'cli/**'
- 'rpc/**'
- '.github/workflows/docs.yaml'
- "docs/**"
- "docsgen/**"
- "cli/**"
- "rpc/**"
- ".github/workflows/docs.yaml"

jobs:
build:
Expand All @@ -42,7 +42,7 @@ jobs:
- name: Setup Go
uses: actions/setup-go@v2-beta
with:
go-version: '1.14'
go-version: "1.14"

- name: Install Go dependencies
run: |
Expand All @@ -57,8 +57,8 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v1
with:
python-version: '3.6'
architecture: 'x64'
python-version: "3.6"
architecture: "x64"

- name: Cache dependencies
uses: actions/cache@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/github-stats.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: github-stats
on:
schedule:
# run every 30 minutes
- cron: '*/30 * * * *'
- cron: "*/30 * * * *"

jobs:
push-stats:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/i18n-nightly-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: i18n-nightly-push
on:
schedule:
# run every day at 1AM
- cron: '0 1 * * *'
- cron: "0 1 * * *"

jobs:
push-to-transifex:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.14'
go-version: "1.14"

- name: Install Taskfile
uses: Arduino/actions/setup-taskfile@master
Expand All @@ -27,4 +27,4 @@ jobs:
env:
TRANSIFEX_PROJECT: ${{ secrets.TRANSIFEX_PROJECT }}
TRANSIFEX_RESOURCE: ${{ secrets.TRANSIFEX_RESOURCE }}
TRANSIFEX_API_KEY: ${{ secrets.TRANSIFEX_API_KEY }}
TRANSIFEX_API_KEY: ${{ secrets.TRANSIFEX_API_KEY }}
6 changes: 3 additions & 3 deletions .github/workflows/i18n-weekly-pull.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: i18n-weekly-pull
on:
schedule:
# run every monday at 2AM
- cron: '0 2 * * 1'
- cron: "0 2 * * 1"

jobs:
pull-from-transifex:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.14'
go-version: "1.14"

- name: Install Go deps
run: |
Expand All @@ -38,4 +38,4 @@ jobs:
with:
commit-message: Updated translation files
title: Updated translation files
branch: i18n/translations-update
branch: i18n/translations-update
9 changes: 4 additions & 5 deletions .github/workflows/nightly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: nightly
on:
schedule:
# run every day at 1AM
- cron: '0 1 * * *'
- cron: "0 1 * * *"

jobs:

create-nightly-artifacts:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -94,9 +93,9 @@ jobs:
- name: upload
uses: docker://plugins/s3
env:
PLUGIN_SOURCE: 'dist/*'
PLUGIN_TARGET: '/arduino-cli/nightly'
PLUGIN_STRIP_PREFIX: 'dist/'
PLUGIN_SOURCE: "dist/*"
PLUGIN_TARGET: "/arduino-cli/nightly"
PLUGIN_STRIP_PREFIX: "dist/"
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@ name: release
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*'
- "[0-9]+.[0-9]+.[0-9]+*"

jobs:

create-release-artifacts:
runs-on: ubuntu-latest

Expand Down Expand Up @@ -134,9 +133,9 @@ jobs:
- name: Upload release files on Arduino downloads servers
uses: docker://plugins/s3
env:
PLUGIN_SOURCE: 'dist/*'
PLUGIN_TARGET: '/arduino-cli/'
PLUGIN_STRIP_PREFIX: 'dist/'
PLUGIN_SOURCE: "dist/*"
PLUGIN_TARGET: "/arduino-cli/"
PLUGIN_STRIP_PREFIX: "dist/"
PLUGIN_BUCKET: ${{ secrets.DOWNLOADS_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ name: stale-bot
on:
schedule:
# run every day at midnight
- cron: '0 0 * * *'
- cron: "0 0 * * *"
issue_comment:
types: ['created']
types: ["created"]

jobs:
stale-bot:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: '1.14'
go-version: "1.14"

- name: Install Go deps
# Since 10/23/2019 pwsh is the default shell
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/verify-formatting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Verify files formatting"

on:
push:
paths:
- "**/*.md"
- "**/*.yml"
- "**/*.yaml"
- ".prettierrc"
- ".prettierignore"
pull_request:
paths:
- "**/*.md"
- "**/*.yml"
- "**/*.yaml"
- ".prettierrc"
- ".prettierignore"

jobs:
verify-formatting:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@master

- name: Install Taskfile
uses: Arduino/actions/setup-taskfile@master
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Verify formatting of all files
run: task docs:check config:check
18 changes: 6 additions & 12 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ changelog:
# We have multiple builds in order to fine tune
# cross compilations.
builds:
-
# OSX
- # OSX
id: arduino_cli_osx
binary: arduino-cli
env:
Expand All @@ -33,8 +32,7 @@ builds:
- amd64
ldflags:
- -s -w -X github.com/arduino/arduino-cli/version.versionString={{.Tag}} -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
-
# ARM
- # ARM
id: arduino_cli_arm
binary: arduino-cli
env:
Expand All @@ -49,8 +47,7 @@ builds:
ldflags:
- -s -w -X github.com/arduino/arduino-cli/version.versionString={{.Tag}} -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- "-extldflags '-static'"
-
# ARMv7
- # ARMv7
id: arduino_cli_armv7
binary: arduino-cli
env:
Expand All @@ -65,8 +62,7 @@ builds:
ldflags:
- -s -w -X github.com/arduino/arduino-cli/version.versionString={{.Tag}} -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- "-extldflags '-static'"
-
# ARM64
- # ARM64
id: arduino_cli_arm64
binary: arduino-cli
env:
Expand All @@ -79,8 +75,7 @@ builds:
ldflags:
- -s -w -X github.com/arduino/arduino-cli/version.versionString={{.Tag}} -X github.com/arduino/arduino-cli/version.commit={{ .ShortCommit }}
- "-extldflags '-static'"
-
# All the other platforms
- # All the other platforms
id: arduino_cli
binary: arduino-cli
env:
Expand All @@ -96,8 +91,7 @@ builds:
- "-extldflags '-static'"

archives:
-
id: "arduino_cli"
- id: "arduino_cli"
format: tar.gz
format_overrides:
- goos: windows
Expand Down
5 changes: 5 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# IDE files
.idea/
.vscode/
.vs/
.ionide/
12 changes: 12 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"semi": false,
"printWidth": 120,
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}
Loading