diff options
author | Akaash Suresh <casa.akaash@gmail.com> | 2020-02-22 22:57:19 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-22 20:57:19 -0800 |
commit | b353028ea5e0ac7b69e7fed4f224c7cb07015ec9 (patch) | |
tree | b090b1907dff0b47de08d24002e3bcf72f92f8f8 /docs/cli.md | |
parent | eb9c2429c69cf034fb3938f0533d15457a2d7820 (diff) | |
download | qmk_firmware-b353028ea5e0ac7b69e7fed4f224c7cb07015ec9.tar.gz qmk_firmware-b353028ea5e0ac7b69e7fed4f224c7cb07015ec9.zip |
New functionality for cformat (#7893)
Fixing complexity
remove lambda
PR review fixes #1
Removing unneccesary string substitution
Handle -a and specified files
Complexity rewrite, use pathlib
Diffstat (limited to 'docs/cli.md')
-rw-r--r-- | docs/cli.md | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/docs/cli.md b/docs/cli.md index 8ee8ab0e8..7c3effcc0 100644 --- a/docs/cli.md +++ b/docs/cli.md | |||
@@ -71,14 +71,36 @@ There are some limitations to the local CLI compared to the global CLI: | |||
71 | 71 | ||
72 | ## `qmk cformat` | 72 | ## `qmk cformat` |
73 | 73 | ||
74 | This command formats C code using clang-format. Run it with no arguments to format all core code, or pass filenames on the command line to run it on specific files. | 74 | This command formats C code using clang-format. |
75 | 75 | ||
76 | **Usage**: | 76 | Run it with no arguments to format all core code that has been changed. Default checks `origin/master` with `git diff`, branch can be changed using `-b <branch_name>` |
77 | |||
78 | Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files. | ||
79 | |||
80 | **Usage for specified files**: | ||
77 | 81 | ||
78 | ``` | 82 | ``` |
79 | qmk cformat [file1] [file2] [...] [fileN] | 83 | qmk cformat [file1] [file2] [...] [fileN] |
80 | ``` | 84 | ``` |
81 | 85 | ||
86 | **Usage for all core files**: | ||
87 | |||
88 | ``` | ||
89 | qmk cformat -a | ||
90 | ``` | ||
91 | |||
92 | **Usage for only changed files against origin/master**: | ||
93 | |||
94 | ``` | ||
95 | qmk cformat | ||
96 | ``` | ||
97 | |||
98 | **Usage for only changed files against branch_name**: | ||
99 | |||
100 | ``` | ||
101 | qmk cformat -b branch_name | ||
102 | ``` | ||
103 | |||
82 | ## `qmk compile` | 104 | ## `qmk compile` |
83 | 105 | ||
84 | This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory. | 106 | This command allows you to compile firmware from any directory. You can compile JSON exports from <https://config.qmk.fm>, compile keymaps in the repo, or compile the keyboard in the current working directory. |