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-07-30 11:29:24 +02:00
|
|
|
skip: [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:
|
2024-07-23 17:05:09 +02:00
|
|
|
node: "lts"
|
2024-07-23 14:47:59 +02:00
|
|
|
# Remember .python-version !
|
2024-09-20 11:27:15 +02:00
|
|
|
python: "3.13"
|
2024-07-23 17:05:09 +02:00
|
|
|
ruby: ".ruby-version"
|
2024-07-22 07:58:58 +02:00
|
|
|
|
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-10-06 11:30:30 +02:00
|
|
|
rev: v5.0.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
|
2024-08-04 07:41:48 +02:00
|
|
|
- id: check-merge-conflict
|
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
|
2024-07-29 08:22:14 +02:00
|
|
|
[
|
|
|
|
--autofix,
|
|
|
|
--indent,
|
|
|
|
"\t",
|
|
|
|
--no-ensure-ascii,
|
|
|
|
--top-keys,
|
|
|
|
"Name,name",
|
|
|
|
]
|
2024-10-06 11:30:30 +02:00
|
|
|
- id: check-illegal-windows-names
|
2023-09-24 11:03:08 +02:00
|
|
|
|
2024-07-30 11:29:24 +02:00
|
|
|
- repo: https://github.com/pre-commit-ci/pre-commit-ci-config
|
|
|
|
rev: v1.6.1
|
|
|
|
hooks:
|
|
|
|
- id: check-pre-commit-ci-config
|
|
|
|
|
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]
|
2024-08-04 07:41:48 +02:00
|
|
|
#args: [
|
|
|
|
# --update-only,
|
|
|
|
# --title,
|
|
|
|
# '<em lang="fi">Automaattinen sisällysluettelo</em> / <em
|
|
|
|
# lang="en">Automatically generated Table of Contents</em>',
|
|
|
|
# ]
|
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
|
2024-10-14 20:06:09 +02:00
|
|
|
rev: 0.29.4
|
2024-07-12 10:38:26 +02:00
|
|
|
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
|
2024-08-28 07:59:38 +02:00
|
|
|
rev: "3.0.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]
|