-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This repository has been created to implement a series of smoke tests for the infrastructure of the Rust[^1] project. The repository contains a set of default developer tooling to ensure a consistent coding style in the project.
- Loading branch information
0 parents
commit b914650
Showing
14 changed files
with
531 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
max_line_length = 80 | ||
trim_trailing_whitespace = true | ||
|
||
[bin/*] | ||
indent_style = tab | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.toml] | ||
indent_size = 4 | ||
indent_style = space | ||
|
||
[*.rs] | ||
max_line_length = 100 | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
indent_style = space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
coverage: | ||
status: | ||
project: | ||
default: | ||
informational: true | ||
patch: | ||
default: | ||
informational: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
$schema: "https://docs.renovatebot.com/renovate-schema.json", | ||
extends: ["config:base"], | ||
|
||
// Disable creating a GitHub issue that lists all available dependency updates | ||
dependencyDashboard: false, | ||
|
||
// Keep pre-commit hooks up-to-date | ||
"pre-commit": { | ||
enabled: true, | ||
}, | ||
|
||
// Disable prefixing commits with the semantic commit type | ||
semanticCommits: "disabled", | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
--- | ||
name: JSON | ||
|
||
"on": | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
detect-changes: | ||
name: Detect changes | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
any_changed: ${{ steps.detect-changes.outputs.any_changed }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get changed files | ||
id: detect-changes | ||
uses: tj-actions/changed-files@v43 | ||
with: | ||
files: | | ||
**/*.json | ||
- name: Print changed files | ||
run: | | ||
for file in ${{ steps.detect-changes.outputs.all_changed_files }}; do | ||
echo "$file" | ||
done | ||
style: | ||
name: Check style | ||
runs-on: ubuntu-latest | ||
|
||
needs: detect-changes | ||
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: prettier | ||
uses: creyD/prettier_action@v4.3 | ||
with: | ||
dry: true | ||
prettier_options: "--check **/*.json" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
--- | ||
name: Markdown | ||
|
||
"on": | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
detect-changes: | ||
name: Detect changes | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
any_changed: ${{ steps.detect-changes.outputs.any_changed }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get changed files | ||
id: detect-changes | ||
uses: tj-actions/changed-files@v43 | ||
with: | ||
files: | | ||
**/*.md | ||
- name: Print changed files | ||
run: | | ||
for file in ${{ steps.detect-changes.outputs.all_changed_files }}; do | ||
echo "$file" | ||
done | ||
lint: | ||
name: Lint code | ||
runs-on: ubuntu-latest | ||
|
||
needs: detect-changes | ||
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: markdownlint-cli | ||
uses: nosborn/github-action-markdown-cli@v3.3.0 | ||
with: | ||
files: "**.md" | ||
|
||
style: | ||
name: Check style | ||
runs-on: ubuntu-latest | ||
|
||
needs: detect-changes | ||
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: prettier | ||
uses: creyD/prettier_action@v4.3 | ||
with: | ||
dry: true | ||
prettier_options: "--check **/*.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
--- | ||
name: YAML | ||
|
||
"on": | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
detect-changes: | ||
name: Detect changes | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
any_changed: ${{ steps.detect-changes.outputs.any_changed }} | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Get changed files | ||
id: detect-changes | ||
uses: tj-actions/changed-files@v43 | ||
with: | ||
files: | | ||
**/*.yaml | ||
**/*.yml | ||
- name: Print changed files | ||
run: | | ||
for file in ${{ steps.detect-changes.outputs.all_changed_files }}; do | ||
echo "$file" | ||
done | ||
lint: | ||
name: Lint code | ||
runs-on: ubuntu-latest | ||
|
||
needs: detect-changes | ||
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run yamllint | ||
uses: actionshub/yamllint@v1.8.2 | ||
|
||
style: | ||
name: Check style | ||
runs-on: ubuntu-latest | ||
|
||
needs: detect-changes | ||
if: needs.detect-changes.outputs.any_changed == 'true' | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: prettier | ||
uses: creyD/prettier_action@v4.3 | ||
with: | ||
dry: true | ||
prettier_options: "--check **/*.{yml,yaml}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Cache for Prettier 4 | ||
node_modules/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# pre-commit configuration | ||
# | ||
# We use pre-commit to enforce a consistency in our repositories. By default, | ||
# YAML and Markdown files get linted, and Prettier runs to auto-format the file | ||
# types it supports. Depending on the project, other rules can be added here to | ||
# support the needs of the project. | ||
# | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
--- | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.5.0 | ||
hooks: | ||
- id: check-added-large-files | ||
args: ["--maxkb=1024"] | ||
- id: check-case-conflict | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
- repo: https://github.com/igorshubovych/markdownlint-cli | ||
rev: v0.39.0 | ||
hooks: | ||
- id: markdownlint | ||
- repo: https://github.com/adrienverge/yamllint | ||
rev: v1.35.1 | ||
hooks: | ||
- id: yamllint | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: v4.0.0-alpha.8 | ||
hooks: | ||
- id: prettier |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
extends: default | ||
|
||
rules: | ||
line-length: | ||
ignore: | | ||
.github/workflows/* |
Oops, something went wrong.