Skip to content

Commit

Permalink
change yamllint to dprint
Browse files Browse the repository at this point in the history
  • Loading branch information
timtorChen committed Nov 25, 2024
1 parent 493fc2e commit b7db0e1
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 39 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/dummy-check.yaml

This file was deleted.

16 changes: 16 additions & 0 deletions .github/workflows/format-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
name: format-check

on:
pull_request:
push:
branches:
- "**"

jobs:
lint:
name: Format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- uses: dprint/check@2f1cf31537886c3bfb05591c031f7744e48ba8a1 # v2.2
9 changes: 6 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ repos:
rev: v8.8.2
hooks:
- id: gitleaks
- repo: https://github.com/adrienverge/yamllint
rev: v1.27.1
- repo: local
hooks:
- id: yamllint
- id: format-docs
name: Format docs
entry: dprint fmt
language: system
pass_filenames: false
10 changes: 10 additions & 0 deletions .tasks/dprint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
version: "3"
silent: true

tasks:
check:
cmd: dprint check {{.CLI_ARGS}}

fmt:
cmd: dprint fmt {{.CLI_ARGS}}
25 changes: 0 additions & 25 deletions .yamllint.yaml

This file was deleted.

1 change: 1 addition & 0 deletions Taskfile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ includes:
taskfile: talos/.taskfile.yaml
dir: talos
kubernetes: kubernetes/.taskfile.yaml
format: .tasks/dprint.yaml

tasks:
pre-commit:init:
Expand Down
7 changes: 7 additions & 0 deletions dprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"plugins": [
"https://plugins.dprint.dev/json-0.15.3.wasm",
"https://plugins.dprint.dev/markdown-0.13.3.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"
]
}

0 comments on commit b7db0e1

Please sign in to comment.