2024-06-19 07:27:28 +02:00
|
|
|
# @format
|
|
|
|
|
2023-05-19 19:35:05 +02:00
|
|
|
# See https://pre-commit.com for more information
|
|
|
|
# See https://pre-commit.ci for more information
|
2023-04-12 07:58:19 +02:00
|
|
|
ci:
|
2024-06-21 05:37:50 +02:00
|
|
|
skip: [install-dev-deps, prettier]
|
2023-05-09 09:57:01 +02:00
|
|
|
# Forĝejo/Gitea mirrors will autoclose pull requests. This should decrease
|
|
|
|
# the frequency of unnecessary PRs.
|
|
|
|
# https://github.com/pre-commit-ci/issues/issues/83
|
2023-05-09 09:58:31 +02:00
|
|
|
autoupdate_schedule: quarterly
|
2023-04-12 07:58:19 +02:00
|
|
|
|
2024-07-22 07:58:58 +02:00
|
|
|
default_language_version:
|
|
|
|
node: lts
|
2024-07-23 14:10:29 +02:00
|
|
|
# 2024-07-23: Kali Linux python3 is 3.11.9, which apparently is incompatible
|
|
|
|
# with the rest of this config.
|
|
|
|
python: python3.12
|
2024-07-22 07:58:58 +02:00
|
|
|
ruby: .ruby-version
|
|
|
|
|
2023-02-21 15:16:09 +01:00
|
|
|
repos:
|
2023-02-21 16:52:47 +01:00
|
|
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
2024-04-10 09:54:24 +02:00
|
|
|
rev: v4.6.0
|
2023-02-21 15:16:09 +01:00
|
|
|
hooks:
|
2023-05-07 17:15:16 +02:00
|
|
|
- id: trailing-whitespace
|
2023-10-16 08:01:54 +02:00
|
|
|
args: ["--markdown-linebreak-ext", "md,markdown"]
|
2023-10-16 08:06:37 +02:00
|
|
|
exclude_types: [svg, tsv]
|
2024-06-06 19:37:28 +02:00
|
|
|
#- id: end-of-file-fixer
|
2023-10-21 07:56:00 +02:00
|
|
|
- id: check-yaml
|
|
|
|
- id: check-added-large-files
|
|
|
|
- id: check-case-conflict
|
2023-10-23 09:26:43 +02:00
|
|
|
- id: check-executables-have-shebangs
|
2023-10-22 19:35:28 +02:00
|
|
|
- id: check-json
|
2023-10-10 09:39:42 +02:00
|
|
|
- id: check-merge-conflict
|
2023-10-23 09:26:43 +02:00
|
|
|
- id: check-shebang-scripts-are-executable
|
2023-10-10 09:39:42 +02:00
|
|
|
- id: check-toml
|
|
|
|
- id: check-xml
|
2023-10-23 09:26:43 +02:00
|
|
|
- id: destroyed-symlinks
|
|
|
|
- id: detect-private-key
|
|
|
|
- id: fix-byte-order-marker
|
2023-10-10 09:39:42 +02:00
|
|
|
- id: mixed-line-ending
|
2023-10-22 19:35:28 +02:00
|
|
|
args: [--fix=auto]
|
2024-05-19 18:49:46 +02:00
|
|
|
- id: pretty-format-json
|
|
|
|
args:
|
|
|
|
# Remember also: --no-sort-keys
|
|
|
|
# ASCII excludes the älphäbet amongst others
|
|
|
|
[--autofix, --no-ensure-ascii]
|
2023-09-24 11:03:08 +02:00
|
|
|
|
2023-04-05 08:48:06 +02:00
|
|
|
# Markdown Table of Contents generation.
|
|
|
|
- repo: https://github.com/thlorenz/doctoc
|
|
|
|
rev: v2.2.0
|
|
|
|
hooks:
|
|
|
|
- id: doctoc
|
|
|
|
# https://github.com/Mikaela/gist/blob/master/doctoc.txt
|
2023-05-13 08:04:46 +02:00
|
|
|
args: [--update-only, --notitle]
|
2023-04-05 08:48:06 +02:00
|
|
|
|
|
|
|
# GitHub Actions etc. configuration validity checking
|
2024-07-12 10:38:26 +02:00
|
|
|
- repo: https://github.com/python-jsonschema/check-jsonschema
|
|
|
|
rev: 0.29.0
|
|
|
|
hooks:
|
|
|
|
#- id: check-jsonschema
|
|
|
|
- id: check-dependabot
|
|
|
|
- id: check-github-actions
|
|
|
|
- id: check-github-workflows
|
|
|
|
- id: check-gitlab-ci
|
|
|
|
- id: check-renovate
|
|
|
|
additional_dependencies: ["pyjson5"]
|
2023-04-09 12:58:35 +02:00
|
|
|
|
2023-04-05 08:48:06 +02:00
|
|
|
# Easierish licensing when attempting reuse compliancy
|
2023-05-21 12:09:30 +02:00
|
|
|
- repo: https://github.com/fsfe/reuse-tool
|
2024-07-09 08:13:06 +02:00
|
|
|
rev: v4.0.3
|
2023-05-21 12:09:30 +02:00
|
|
|
hooks:
|
|
|
|
- id: reuse
|
2023-04-05 08:48:06 +02:00
|
|
|
|
2024-06-06 15:30:59 +02:00
|
|
|
- repo: local
|
2023-02-21 16:52:47 +01:00
|
|
|
hooks:
|
2024-06-11 20:07:29 +02:00
|
|
|
- id: prettier
|
2024-06-06 15:30:59 +02:00
|
|
|
name: prettier
|
2024-07-14 15:28:37 +02:00
|
|
|
entry: corepack pnpx prettier --cache --ignore-unknown --write
|
2024-06-06 15:30:59 +02:00
|
|
|
language: system
|
|
|
|
|
2023-04-05 08:48:06 +02:00
|
|
|
# .editorconfig validity checking
|
2023-02-21 18:28:28 +01:00
|
|
|
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
2023-10-13 12:32:48 +02:00
|
|
|
rev: "2.7.3"
|
2023-02-21 17:23:28 +01:00
|
|
|
hooks:
|
2023-02-21 18:28:28 +01:00
|
|
|
- id: editorconfig-checker
|
2023-02-21 17:23:28 +01:00
|
|
|
alias: ec
|
2023-04-04 08:47:06 +02:00
|
|
|
# I don't actually care about line lengths as more than a guideline
|
|
|
|
args: [-disable-max-line-length]
|