-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3915 from Holzhaus/qmlformat-pre-commit
pre-commit: Add hooks for qmllint and qmlformat
- Loading branch information
Showing
2 changed files
with
32 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,18 +8,15 @@ jobs: | |
pre-commit: | ||
name: Detecting code style issues | ||
runs-on: ubuntu-latest | ||
# The Dockerfile for this container can be found at: | ||
# https://github.com/Holzhaus/mixxx-ci-docker | ||
container: holzhaus/mixxx-ci:20210526 | ||
steps: | ||
- name: "Check out repository" | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 2 | ||
|
||
- name: "Set up Python" | ||
uses: actions/setup-python@v2 | ||
|
||
- name: Install clang-format | ||
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends clang-format-10 | ||
|
||
- name: "Detect code style issues (push)" | ||
uses: pre-commit/[email protected] | ||
if: github.event_name == 'push' | ||
|
@@ -28,16 +25,24 @@ jobs: | |
# on Pull Requests!). | ||
env: | ||
SKIP: end-of-file-fixer,trailing-whitespace,clang-format,eslint,no-commit-to-branch | ||
with: | ||
# Enable extra hooks that require special system dependencies that we | ||
# cannot expect to be installed on all contributor's systems. | ||
extra_args: --hook-stage manual --all-files | ||
|
||
- name: "Detect code style issues (pull_request)" | ||
uses: pre-commit/[email protected] | ||
if: github.event_name == 'pull_request' | ||
env: | ||
SKIP: no-commit-to-branch | ||
with: | ||
# Enable extra hooks that require special system dependencies that are | ||
# available in our custom docker container, but cannot be expected to | ||
# be installed on all contributor's systems. | ||
# | ||
# HEAD is the not yet integrated PR merge commit +refs/pull/xxxx/merge | ||
# HEAD^1 is the PR target branch and HEAD^2 is the HEAD of the source branch | ||
extra_args: --from-ref HEAD^1 --to-ref HEAD | ||
extra_args: --hook-stage manual --from-ref HEAD^1 --to-ref HEAD | ||
|
||
- name: "Generate patch file" | ||
if: failure() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters