Skip to content

Commit

Permalink
ci(pre-commit): Migrate from qmlformat to qml_formatter
Browse files Browse the repository at this point in the history
Although `qml_formatter` is much less mature, we can at least pin a
specific version via pre-commit. This is especially important since
`qmlformat` seems to change its formatting rules on every version bump,
so version incompatibilities between local computer and CI happen very
often.
  • Loading branch information
Holzhaus committed Jan 19, 2023
1 parent 89f5860 commit ca79b20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
# The Dockerfile for this container can be found at:
# https://github.com/Holzhaus/mixxx-ci-docker
container: holzhaus/mixxx-ci:20220805
container: holzhaus/mixxx-ci:20220930
steps:
- name: "Check out repository"
uses: actions/checkout@v3
Expand Down
11 changes: 4 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ repos:
hooks:
- id: prettier
types: [yaml]
- repo: https://github.com/qarmin/qml_formatter.git
rev: 0.2.0
hooks:
- id: qml_formatter
- repo: local
hooks:
- id: qsscheck
Expand All @@ -139,13 +143,6 @@ repos:
language: python
types: [text]
files: ^CHANGELOG.md$
- id: qmlformat
name: qmlformat
entry: python tools/qmlformat.py
pass_filenames: true
language: python
types: [text]
files: ^.*\.qml$
- id: qmllint
name: qmllint
entry: qmllint
Expand Down

0 comments on commit ca79b20

Please sign in to comment.