From 6c4b6531fe8fed46bec54fae993a1bab8246dd7d Mon Sep 17 00:00:00 2001 From: Joel Challis Date: Thu, 10 Dec 2020 17:01:51 +0000 Subject: CI: Add workflow for codebase formatting (#7382) * Add workflow for codebase formatting * stash * review comments * Swap to a more complete push action --- lib/python/qmk/cli/fileformat.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/python/qmk/cli/fileformat.py (limited to 'lib/python/qmk/cli/fileformat.py') diff --git a/lib/python/qmk/cli/fileformat.py b/lib/python/qmk/cli/fileformat.py new file mode 100644 index 0000000000..502a3b7b1f --- /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', 'dos2unix **']) + return dos2unix.returncode -- cgit v1.2.3