aboutsummaryrefslogtreecommitdiffstats
path: root/docs/cli.md
diff options
context:
space:
mode:
authorAkaash Suresh <casa.akaash@gmail.com>2020-02-22 22:57:19 -0600
committerGitHub <noreply@github.com>2020-02-22 20:57:19 -0800
commitb353028ea5e0ac7b69e7fed4f224c7cb07015ec9 (patch)
treeb090b1907dff0b47de08d24002e3bcf72f92f8f8 /docs/cli.md
parenteb9c2429c69cf034fb3938f0533d15457a2d7820 (diff)
downloadfirmware-b353028ea5e0ac7b69e7fed4f224c7cb07015ec9.tar.gz
firmware-b353028ea5e0ac7b69e7fed4f224c7cb07015ec9.tar.bz2
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.md26
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:
## `qmk cformat`
-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.
+This command formats C code using clang-format.
-**Usage**:
+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>`
+
+Run it with `-a` to format all core code, or pass filenames on the command line to run it on specific files.
+
+**Usage for specified files**:
```
qmk cformat [file1] [file2] [...] [fileN]
```
+**Usage for all core files**:
+
+```
+qmk cformat -a
+```
+
+**Usage for only changed files against origin/master**:
+
+```
+qmk cformat
+```
+
+**Usage for only changed files against branch_name**:
+
+```
+qmk cformat -b branch_name
+```
+
## `qmk compile`
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.