You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
forgejo/workflows: add pre-commit based linting
This commit is contained in:
23
.forgejo/pre-commit/config.yaml
Normal file
23
.forgejo/pre-commit/config.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
exclude: ^tests/ref/
|
||||||
|
|
||||||
|
repos:
|
||||||
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
|
rev: v5.0.0
|
||||||
|
hooks:
|
||||||
|
- id: check-case-conflict
|
||||||
|
- id: check-executables-have-shebangs
|
||||||
|
- id: check-illegal-windows-names
|
||||||
|
- id: check-shebang-scripts-are-executable
|
||||||
|
- id: check-yaml
|
||||||
|
- id: end-of-file-fixer
|
||||||
|
- id: fix-byte-order-marker
|
||||||
|
- id: mixed-line-ending
|
||||||
|
- id: trailing-whitespace
|
||||||
|
- repo: https://github.com/codespell-project/codespell
|
||||||
|
rev: v2.4.1
|
||||||
|
hooks:
|
||||||
|
- id: codespell
|
||||||
|
args:
|
||||||
|
- --ignore-words=.forgejo/pre-commit/ignored-words.txt
|
||||||
|
- --ignore-multiline-regex=codespell:off.*?(codespell:on|\Z)
|
||||||
|
exclude: ^tools/(patcheck|clean-diff)$
|
118
.forgejo/pre-commit/ignored-words.txt
Normal file
118
.forgejo/pre-commit/ignored-words.txt
Normal file
@ -0,0 +1,118 @@
|
|||||||
|
abl
|
||||||
|
acount
|
||||||
|
ACN
|
||||||
|
addin
|
||||||
|
alis
|
||||||
|
alls
|
||||||
|
als
|
||||||
|
ALOG
|
||||||
|
ALS
|
||||||
|
anull
|
||||||
|
ANC
|
||||||
|
ans
|
||||||
|
ANS
|
||||||
|
basf
|
||||||
|
bloc
|
||||||
|
brane
|
||||||
|
BREIF
|
||||||
|
bu
|
||||||
|
BU
|
||||||
|
bufer
|
||||||
|
caf
|
||||||
|
CAF
|
||||||
|
clen
|
||||||
|
clens
|
||||||
|
Collet
|
||||||
|
compre
|
||||||
|
dum
|
||||||
|
endin
|
||||||
|
erro
|
||||||
|
fiel
|
||||||
|
FIEL
|
||||||
|
fils
|
||||||
|
filp
|
||||||
|
filterd
|
||||||
|
FILTERD
|
||||||
|
fle
|
||||||
|
fo
|
||||||
|
FPR
|
||||||
|
fro
|
||||||
|
Hald
|
||||||
|
ine
|
||||||
|
inh
|
||||||
|
inouts
|
||||||
|
indx
|
||||||
|
inout
|
||||||
|
inport
|
||||||
|
ist
|
||||||
|
laf
|
||||||
|
LAF
|
||||||
|
lastr
|
||||||
|
LinS
|
||||||
|
mapp
|
||||||
|
mis
|
||||||
|
mot
|
||||||
|
nd
|
||||||
|
nIn
|
||||||
|
offsetp
|
||||||
|
orderd
|
||||||
|
ot
|
||||||
|
outout
|
||||||
|
padd
|
||||||
|
paeth
|
||||||
|
PAETH
|
||||||
|
parm
|
||||||
|
PARM
|
||||||
|
parms
|
||||||
|
pEvents
|
||||||
|
PixelX
|
||||||
|
Psot
|
||||||
|
quater
|
||||||
|
readd
|
||||||
|
reencode
|
||||||
|
Reencode
|
||||||
|
recuse
|
||||||
|
redY
|
||||||
|
remaind
|
||||||
|
renderD
|
||||||
|
rin
|
||||||
|
SAV
|
||||||
|
SEH
|
||||||
|
ser
|
||||||
|
SER
|
||||||
|
setts
|
||||||
|
shft
|
||||||
|
siz
|
||||||
|
SIZ
|
||||||
|
skipd
|
||||||
|
sme
|
||||||
|
som
|
||||||
|
sover
|
||||||
|
STAP
|
||||||
|
startd
|
||||||
|
statics
|
||||||
|
struc
|
||||||
|
suble
|
||||||
|
te
|
||||||
|
TE
|
||||||
|
tha
|
||||||
|
tne
|
||||||
|
tolen
|
||||||
|
tpye
|
||||||
|
tre
|
||||||
|
truns
|
||||||
|
trun
|
||||||
|
TRUN
|
||||||
|
Tung
|
||||||
|
tE
|
||||||
|
TYE
|
||||||
|
ue
|
||||||
|
ues
|
||||||
|
UES
|
||||||
|
vai
|
||||||
|
vas
|
||||||
|
vor
|
||||||
|
vie
|
||||||
|
VILL
|
||||||
|
wel
|
||||||
|
wih
|
26
.forgejo/workflows/lint.yml
Normal file
26
.forgejo/workflows/lint.yml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: utilities
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Install pre-commit CI
|
||||||
|
id: install
|
||||||
|
run: |
|
||||||
|
python3 -m venv ~/pre-commit
|
||||||
|
~/pre-commit/bin/pip install --upgrade pip setuptools
|
||||||
|
~/pre-commit/bin/pip install pre-commit
|
||||||
|
echo "envhash=$({ python3 --version && cat .forgejo/pre-commit/config.yaml; } | sha256sum | cut -d' ' -f1)" >> $FORGEJO_OUTPUT
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: ~/.cache/pre-commit
|
||||||
|
key: pre-commit-${{ steps.install.outputs.envhash }}
|
||||||
|
- name: Run pre-commit CI
|
||||||
|
run: ~/pre-commit/bin/pre-commit run -c .forgejo/pre-commit/config.yaml --show-diff-on-failure --color=always --all-files
|
Reference in New Issue
Block a user