The Wayback Machine - https://web.archive.org/web/20220125090843/https://github.com/arduino/arduino-cli/commit/02416e7501c9996e796471516ae00ddf027ca3ab
Skip to content
Permalink
Browse files
[skip changelog] Introduce linting and formatting for docs and config…
… files (#836)

* [skip changelog] Add linting/formatting tasks and CI checks for docs and config files

* [skip changelog] Format all docs and config files

* [skip changelog] Update contributing documentation with formatting instructions

* [skip changelog] Fix some Prettier configuration issues

* [skip changelog] Format all config files

* [skip changelog] Fix documentation indentation issue

* [skip changelog] Removed files from .prettierignore

* [skip changelog] Update docs/package_index_json-specification.md

Co-authored-by: per1234 <[email protected]>

* [skip changelog] Format PR and issues templates

* [skip changelog] Format files after rebase

* [skip changelog] Update .prettierrc and reformat everything

Co-authored-by: per1234 <[email protected]>
  • Loading branch information
silvanocerza and per1234 committed Jul 21, 2020
1 parent 8449ac1 commit 02416e7501c9996e796471516ae00ddf027ca3ab
@@ -7,4 +7,4 @@ update_configs:
- match:
update_type: "security"
default_labels:
- "component/dependencies"
- "component/dependencies"
@@ -15,7 +15,7 @@ indent_size = 4
indent_style = space
indent_size = 4

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

@@ -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. -->
@@ -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/)
@@ -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:
@@ -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:
@@ -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: |
@@ -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
@@ -3,7 +3,7 @@ name: github-stats
on:
schedule:
# run every 30 minutes
- cron: '*/30 * * * *'
- cron: "*/30 * * * *"

jobs:
push-stats:
@@ -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:
@@ -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
@@ -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 }}
@@ -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:
@@ -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: |
@@ -38,4 +38,4 @@ jobs:
with:
commit-message: Updated translation files
title: Updated translation files
branch: i18n/translations-update
branch: i18n/translations-update
@@ -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

@@ -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 }}
@@ -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

@@ -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 }}
@@ -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:
@@ -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
@@ -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
@@ -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:
@@ -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:
@@ -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:
@@ -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:
@@ -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:
@@ -96,8 +91,7 @@ builds:
- "-extldflags '-static'"

archives:
-
id: "arduino_cli"
- id: "arduino_cli"
format: tar.gz
format_overrides:
- goos: windows
@@ -0,0 +1,5 @@
# IDE files
.idea/
.vscode/
.vs/
.ionide/
@@ -0,0 +1,12 @@
{
"semi": false,
"printWidth": 120,
"overrides": [
{
"files": "*.md",
"options": {
"proseWrap": "always"
}
}
]
}

0 comments on commit 02416e7

Please sign in to comment.