Skip to content

Commit

Permalink
switch yamlfmt
Browse files Browse the repository at this point in the history
  • Loading branch information
hofbi committed May 15, 2024
1 parent 5518d92 commit 42b921c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 21 deletions.
23 changes: 11 additions & 12 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ repos:
- python
- shell
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -61,12 +61,11 @@ repos:
- id: markdown-link-check
args: ["--quiet", "--config", ".md-link-config.json"]
exclude: ^slides/homework
- repo: https://github.com/jumanjihouse/pre-commit-hook-yamlfmt
rev: 0.2.3
- repo: https://github.com/google/yamlfmt
rev: v0.12.1
hooks:
- id: yamlfmt
args: [--mapping=2, --sequence=4, --offset=2, --implicit_start, --preserve-quotes]
exclude: (?x)( .gitlab-ci.yml | .clang-format | .clang-tidy )
exclude: (?x)( .clang-format | .clang-tidy )
- repo: https://github.com/adrienverge/yamllint
rev: v1.35.1
hooks:
Expand All @@ -83,7 +82,7 @@ repos:
- id: docformatter
additional_dependencies: [tomli]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.2
rev: v18.1.5
hooks:
- id: clang-format
- repo: https://github.com/cpplint/cpplint
Expand All @@ -98,8 +97,8 @@ repos:
- id: cmake-lint
additional_dependencies: [cmakelang]
exclude: cmake/.*
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.4
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.4.4
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -112,12 +111,12 @@ repos:
- flake8-bugbear # Ruff does not implement all of bugbear
- flake8-requirements # Not yet implemented https://github.com/astral-sh/ruff/issues/4100
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.9.0
rev: v1.10.0
hooks:
- id: mypy
args: [--python-version, '3.10']
- repo: https://github.com/PyCQA/pylint
rev: v3.1.0
rev: v3.2.0
hooks:
- id: pylint
- repo: https://github.com/asottile/pyupgrade
Expand All @@ -130,10 +129,10 @@ repos:
hooks:
- id: shellcheck
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.28.0
rev: 0.28.3
hooks:
- id: check-github-workflows
- repo: https://github.com/crate-ci/typos
rev: v1.19.0
rev: v1.21.0
hooks:
- id: typos
6 changes: 6 additions & 0 deletions .yamlfmt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
formatter:
type: basic
drop_merge_tag: true
pad_line_comments: 2 # Align with yamllint
scan_folded_as_literal: true
retain_line_breaks: true
5 changes: 2 additions & 3 deletions docs/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
version: '3'
services:
html:
image: asciidoctor/docker-asciidoctor:latest
image: asciidoctor/docker-asciidoctor
volumes:
- ./:/documents
command: make html
pdf:
image: asciidoctor/docker-asciidoctor:latest
image: asciidoctor/docker-asciidoctor
volumes:
- ./:/documents
command: make pdf
2 changes: 1 addition & 1 deletion docs/theme/tum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ header:
right:
content: $header-recto-right-content
heading:
font-color: #3070b3
font-color: "#3070b3"
2 changes: 1 addition & 1 deletion slides/.marprc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ allowLocalFiles: true
options:
looseYAML: false
markdown:
breaks: true # newlines in paragraphs are rendered as <br>
breaks: true # newlines in paragraphs are rendered as <br>
bespoke:
progress: true
output: ./build/
Expand Down
5 changes: 2 additions & 3 deletions slides/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
version: '3'
services:
generate:
image: marpteam/marp-cli:v2.4.0
image: marpteam/marp-cli
volumes:
- ./:/home/marp/app
environment:
- LANG=de_DE.UTF-8
- MARP_USER=""
command: --input-dir ./lecture
serve:
image: marpteam/marp-cli:v2.4.0
image: marpteam/marp-cli
volumes:
- ./:/home/marp/app
environment:
Expand Down
2 changes: 1 addition & 1 deletion tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ You can disable removal of solutions by setting flag `-k` or `--keep-solutions`

## GitLab Project Creation

Script [create_gitlab_projects.py](create_gitlab_projects.py) creates `-n`/`--homework-number` (default 1) repositories with contents from an export folder `-s`/`--source-path`, defaulting to `repository/export/homework`.
Script [create_gitlab_projects.py](create_gitlab_projects.py) creates `-n`/`--homework-number` (default 1) repositories with contents from an export folder `-s`/`--source-path`, defaulting to `repository/export/homework` (same default location as for the [export files tool](../README.md#export-files) creating this bundle).
The script also creates a config file in folder `-r` or `--repo-info-dir` (default `config`) to contain the names and IDs of the newly created repos.
The json file's stem in that folder equals the `-g`/`--group-id`.
Existing files with identical file names will be overwritten.
Expand Down

0 comments on commit 42b921c

Please sign in to comment.