summaryrefslogtreecommitdiff
path: root/lib/python/qmk
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2020-12-24 13:36:44 +1100
committerDrashna Jael're <drashna@live.com>2021-01-12 22:46:10 -0800
commitedc6a30ccc2c34cb2076b0c3bfc2019eee8ab984 (patch)
treed57a42b334a0687e53d964f0f044c271452c2fc9 /lib/python/qmk
parent074147a74a99bf594185654c3ad3d8ba2f06ae49 (diff)
`qmk fileformat`: only print complaints, and fix some of them (#11278)
Diffstat (limited to 'lib/python/qmk')
-rw-r--r--lib/python/qmk/cli/fileformat.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/python/qmk/cli/fileformat.py b/lib/python/qmk/cli/fileformat.py
new file mode 100644
index 0000000000..112d8d59da
--- /dev/null
+++ b/lib/python/qmk/cli/fileformat.py
@@ -0,0 +1,13 @@
+"""Format files according to QMK's style.
+"""
+from milc import cli
+
+import subprocess
+
+
+@cli.subcommand("Format files according to QMK's style.", hidden=True)
+def fileformat(cli):
+ """Run several general formatting commands.
+ """
+ dos2unix = subprocess.run(['bash', '-c', 'git ls-files -z | xargs -0 dos2unix'], stdout=subprocess.DEVNULL)
+ return dos2unix.returncode