Add CI, mdl and pre-commit

This commit is contained in:
Henrik Hüttemann
2023-05-20 10:41:41 +02:00
parent 6ba65443f1
commit 8804c37d6d
5 changed files with 40 additions and 1 deletions
+4
View File
@@ -0,0 +1,4 @@
all # Import all rules
rule "MD007", :indent => 2 # Unordered list indentation: 2 spaces
rule "MD009", :br_spaces => 2 # Allow MD line breaks (` `, double spaces)
exclude_rule "MD013" # Ignore Line length
+2
View File
@@ -0,0 +1,2 @@
style "#{File.dirname(__FILE__)}/.markdown-style.rb"
git_recurse true
+20
View File
@@ -0,0 +1,20 @@
exclude: |
(?x)
.drawio$|
tsconfig.json$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-executables-have-shebangs
- id: check-json
- id: check-merge-conflict
- id: check-symlinks
- id: check-xml
- id: check-yaml
- id: end-of-file-fixer
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: no-commit-to-branch
- id: trailing-whitespace
+13
View File
@@ -0,0 +1,13 @@
pipeline:
lint-markdown:
image: markdownlint/markdownlint:latest
commands:
- mdl .
check-pre-commit:
image: python:latest
environment:
- SKIP=no-commit-to-branch # Ignore "don't commit to protected branch" check
commands:
- pip install pre-commit
- pre-commit run --all-files
+1 -1
View File
@@ -28,7 +28,7 @@ mapRoom (rcRoom) {
case 'c':
room.preset = 'public_chat'
break;
case 'p':
room.preset = 'private_chat'
break;