Skip to content

Commit

Permalink
Add diff logic to python format subcommand (qmk#15156)
Browse files Browse the repository at this point in the history
* Add diff logic to python format subcommand

* Update test

* Add in filter per format-c

* fix tests

* Update new workflow
  • Loading branch information
zvecr authored and coquizen committed Jun 3, 2022
1 parent 792416c commit 71122cd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,16 +36,14 @@ jobs:
- name: Run qmk formatters
shell: 'bash {0}'
run: |
cat ~/files_added.txt ~/files_modified.txt > ~/files_changed.txt
qmk format-c --core-only $(< ~/files_changed.txt) || true
qmk format-python $(< ~/files_changed.txt) || true
qmk format-text $(< ~/files_changed.txt) || true
qmk format-c --core-only $(< ~/files.txt)
qmk format-python $(< ~/files.txt)
qmk format-text $(< ~/files.txt)
git diff
- name: Fail when formatting required
run: |
git diff
for file in $(git diff --name-only); do
echo "File '${file}' Requires Formatting"
echo "::error file=${file}::Requires Formatting"
echo "::error file=${file}::::File Requires Formatting"
done
test -z "$(git diff --name-only)"

0 comments on commit 71122cd

Please sign in to comment.