Skip to content

Commit 4fce304

Browse files
committed
ci:
ci: setup everything - add .vale.ini to setup Vale tool - .gitignore exclude imported Vale Packages - .yamllint.yaml YAML validation, excluding imported Vale Packages - add .editorconfig to define files format - add .ecrc to validate files format against .editorconfig but, excluding imported Vale Packages - Git hooks via pre-commit including: - typos - codespell - yamllint - added following items to GitHub Actions: - yamllint - vale - typos - codespell - markdownlint-cli2 - editorconfig-checker
1 parent 3431be5 commit 4fce304

File tree

11 files changed

+118
-20
lines changed

11 files changed

+118
-20
lines changed

.ecrc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"Version": "3.0.1",
3+
"Verbose": false,
4+
"Format": "",
5+
"Debug": false,
6+
"IgnoreDefaults": false,
7+
"SpacesAftertabs": false,
8+
"NoColor": false,
9+
"Exclude": [
10+
".vale/styles/RedHat"
11+
],
12+
"AllowedContentTypes": [],
13+
"PassedFiles": [],
14+
"Disable": {
15+
"EndOfLine": false,
16+
"Indentation": false,
17+
"InsertFinalNewline": false,
18+
"TrimTrailingWhitespace": false,
19+
"IndentSize": false,
20+
"MaxLineLength": false
21+
}
22+
}

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by editorconfig.timseverien.com
2+
# https://editor.timseverien.com/#config
3+
root = true
4+
5+
[*.{md}]
6+
charset = utf-8
7+
end_of_line = lf
8+
tab_width = 2
9+
trim_trailing_whitespace = true
10+
max_line_length = 200
11+
12+
[*.{yml,yaml}]
13+
charset = utf-8
14+
end_of_line = lf
15+
insert_final_newline = true
16+
tab_width = 2
17+
trim_trailing_whitespace = true
18+
max_line_length = 200

.github/workflows/actions-lint.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
on: push
3+
4+
jobs:
5+
action-lint:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: checkout-action
9+
uses: actions/[email protected]
10+
- name: actionlint
11+
uses: raven-actions/[email protected]

.github/workflows/ci.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,31 @@
11
---
22
name: CI
3-
on: # yamllint disable-line rule:truthy
3+
on:
44
push:
55
jobs:
6-
yaml-lint:
6+
ci-lint:
77
runs-on: ubuntu-latest
8+
strategy:
9+
# if one fails continues running the others
10+
fail-fast: false
811
steps:
9-
- uses: actions/checkout@v3
10-
- name: yaml-lint
12+
- name: checkout-action
13+
uses: actions/[email protected]
14+
15+
- name: yamllint-action
1116
uses: ibiqlik/action-yamllint@v3
17+
18+
- name: vale-action
19+
uses: errata-ai/[email protected]
20+
21+
- name: typos-action
22+
uses: crate-ci/[email protected]
23+
24+
- name: Codespell with annotations
25+
uses: codespell-project/[email protected]
26+
27+
- name: markdownlint-cli2-action
28+
uses: DavidAnson/[email protected]
29+
30+
- name: editorconfig-checker-action
31+
uses: editorconfig-checker/action-editorconfig-checker@v2

.github/workflows/spellchecker.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vale/styles/RedHat/

.pre-commit-config.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
repos:
3+
- repo: https://github.com/crate-ci/typos
4+
rev: v1.22.9
5+
hooks:
6+
- id: typos
7+
8+
- repo: https://github.com/codespell-project/codespell
9+
rev: v2.2.4
10+
hooks:
11+
- id: codespell
12+
13+
- repo: https://github.com/adrienverge/yamllint.git
14+
rev: v1.35.1
15+
hooks:
16+
- id: yamllint
17+
files: \.(yaml|yml)$

.vale.ini

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
StylesPath = .vale/styles/
2+
3+
MinAlertLevel = suggestion
4+
5+
Packages = RedHat
6+
7+
[*.md]
8+
BasedOnStyles = Vale, RedHat

.vale/styles/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Vale styles for repository
2+
3+
Please examine the files

.yamllint.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
extends: default
3+
4+
# These files are imported by vale from an external repository
5+
ignore: |
6+
.vale/styles/RedHat/
7+
rules:
8+
truthy:
9+
# the node "on:" present in each GitHub Actions workflow file
10+
ignore: |
11+
.github/

0 commit comments

Comments
 (0)