Skip to content

Commit d06f425

Browse files
authored
Merge pull request #244 from berquist/yamlfmt
pre-commit: add yamlfmt
2 parents ae6fcb5 + 7721c30 commit d06f425

File tree

5 files changed

+47
-6
lines changed

5 files changed

+47
-6
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# sort lines in regressionfiles.txt
22
1c01a3f1750a1d8c7bb92527175ccc29e4bf961e
3+
4+
# pre-commit: apply yamlfmt
5+
2ca4497ffaa7e478eedb2b9aea9e4f55a0bed5f7

.github/workflows/nix.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
# Install Nix on the runner
20-
- uses: cachix/install-nix-action@fd24c48048070c1be9acd18c9d369a83f0fe94d7 # v31
20+
- uses: cachix/install-nix-action@fd24c48048070c1be9acd18c9d369a83f0fe94d7 # v31
2121
with:
2222
nix_path: nixpkgs=channel:nixos-unstable
2323
# Pull from the cachix cache
24-
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
24+
- uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16
2525
with:
2626
name: cclib
2727
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
2828
# Checkout of the current head in the working dir
29-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
29+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
3030
with:
3131
persist-credentials: false
3232
- name: Check nix flake

.github/workflows/pre-commit.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
pre-commit:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
18+
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
1919
with:
2020
persist-credentials: false
21-
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
21+
- uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6
2222
- name: install dependencies for sorting regressionfiles.yaml
2323
run: |
2424
python -m pip install 'ruamel.yaml'
25-
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1
25+
- uses: pre-commit/action@2c7b3805fd2a0fd8c1884dcaebf91fc102a13ecd # v3.0.1

.pre-commit-config.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@ repos:
3939
^Turbomole|
4040
^XTB
4141
)
42+
- repo: https://github.com/google/yamlfmt
43+
rev: "v0.17.2"
44+
hooks:
45+
- id: yamlfmt
4246
- repo: local
4347
hooks:
4448
- id: sort-regressionfiles-yaml

.yamlfmt.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
continue_on_error: false
3+
doublestar: false
4+
exclude: []
5+
extensions:
6+
- yaml
7+
- yml
8+
gitignore_excludes: false
9+
gitignore_path: .gitignore
10+
include: []
11+
line_ending: lf
12+
match_type: standard
13+
output_format: default
14+
regex_exclude: []
15+
formatter:
16+
array_indent: 0
17+
disable_alias_key_correction: false
18+
disallow_anchors: false
19+
drop_merge_tag: false
20+
eof_newline: true
21+
force_array_style: ""
22+
include_document_start: true
23+
indent: 2
24+
indent_root_array: false
25+
indentless_arrays: false
26+
line_ending: lf
27+
max_line_length: 0
28+
pad_line_comments: 2
29+
retain_line_breaks: false
30+
retain_line_breaks_single: true
31+
scan_folded_as_literal: false
32+
strip_directives: false
33+
trim_trailing_whitespace: true
34+
type: basic

0 commit comments

Comments
 (0)