mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 02:36:15 +03:00
GHA CI: add file health checking
parent
d5dcc30e5a
commit
35fe9c3296
3 changed files with 73 additions and 0 deletions
25
.github/workflows/ci_file_health.yaml
vendored
Normal file
25
.github/workflows/ci_file_health.yaml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
name: CI - File health
|
||||||
|
|
||||||
|
on: [pull_request, push]
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
||||||
|
cancel-in-progress: ${{ github.head_ref != '' }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
ci:
|
||||||
|
name: Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install tools
|
||||||
|
uses: actions/setup-python@v5
|
||||||
|
with:
|
||||||
|
python-version: "*"
|
||||||
|
|
||||||
|
- name: Check files
|
||||||
|
uses: pre-commit/action@v3.0.1
|
18
.github/workflows/helper/pre-commit/.typos.toml
vendored
Normal file
18
.github/workflows/helper/pre-commit/.typos.toml
vendored
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
|
||||||
|
# https://github.com/crate-ci/typos/blob/master/docs/design.md#identifiers-and-words
|
||||||
|
|
||||||
|
# try adding to `identifiers` list first, if doesn't work then `words` list
|
||||||
|
|
||||||
|
[default.extend-identifiers]
|
||||||
|
additionals = "additionals"
|
||||||
|
caf = "caf"
|
||||||
|
curren = "curren"
|
||||||
|
FO = "FO"
|
||||||
|
ket = "ket"
|
||||||
|
Q_INVOKABLE = "Q_INVOKABLE"
|
||||||
|
switchs = "switchs"
|
||||||
|
ths = "ths"
|
||||||
|
|
||||||
|
[default.extend-words]
|
||||||
|
BA = "BA"
|
||||||
|
helo = "helo"
|
30
.pre-commit-config.yaml
Normal file
30
.pre-commit-config.yaml
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks.git
|
||||||
|
rev: v4.5.0
|
||||||
|
hooks:
|
||||||
|
- id: fix-byte-order-marker
|
||||||
|
name: Check file encoding (UTF-8 without BOM)
|
||||||
|
|
||||||
|
- id: mixed-line-ending
|
||||||
|
name: Check line ending character (LF)
|
||||||
|
args: ["--fix=lf"]
|
||||||
|
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
name: Check trailing newlines
|
||||||
|
|
||||||
|
- id: trailing-whitespace
|
||||||
|
name: Check trailing whitespaces
|
||||||
|
|
||||||
|
- repo: https://github.com/codespell-project/codespell.git
|
||||||
|
rev: v2.2.6
|
||||||
|
hooks:
|
||||||
|
- id: codespell
|
||||||
|
name: Check spelling (codespell)
|
||||||
|
args: ["--ignore-words-list", ""]
|
||||||
|
|
||||||
|
- repo: https://github.com/crate-ci/typos.git
|
||||||
|
rev: v1.16.18
|
||||||
|
hooks:
|
||||||
|
- id: typos
|
||||||
|
name: Check spelling (typos)
|
||||||
|
args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
|
Loading…
Reference in a new issue