qmk_firmware/lib/python/qmk/cli/fileformat.py
Joel Challis 1ebd243cdc
CI automated format fixes (#11179)
* Format all C files for now, till diff logic works within CI

* Fix recursion of dos2unix
2020-12-11 13:49:03 +00:00

14 lines
352 B
Python

"""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'])
return dos2unix.returncode