From edc6a30ccc2c34cb2076b0c3bfc2019eee8ab984 Mon Sep 17 00:00:00 2001 From: Ryan Date: Thu, 24 Dec 2020 13:36:44 +1100 Subject: `qmk fileformat`: only print complaints, and fix some of them (#11278) --- lib/python/qmk/cli/fileformat.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/python/qmk/cli/fileformat.py (limited to 'lib') 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 -- cgit v1.2.3