Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
BlankSpruce committed Aug 2, 2024
1 parent 194dc2f commit 7cca1f7
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ usage: gersemi [-c] [-i] [--diff] [--default-config] [--version] [-h] [-l INTEGE
[--indent (INTEGER | tabs)] [--unsafe] [-q] [--color]
[--definitions src [src ...]]
[--list-expansion {favour-inlining,favour-expansion}] [-w INTEGER]
[--cache] [--require-definitions]
[src ...]
A formatter to make your CMake code the real treasure.
Expand Down Expand Up @@ -71,6 +72,16 @@ configuration:
-w INTEGER, --workers INTEGER
Number of workers used to format multiple files in parallel.
[default: number of CPUs on this system]
--cache, --no-cache Enables cache with data about files that are known to be
formatted to speed up execution.
[default: cache enabled]
--require-definitions, --no-require-definitions
Require definitions of custom commands. When enabled file which
has unknown custom commands will have warnings issued about
that and result won't be cached. When disabled it will be
assumed that original formatting of unknown command is the
correct one. See: "Let's make a deal" section in README.
[default: definitions are required]
```

### [pre-commit](https://pre-commit.com/) hook
Expand Down Expand Up @@ -442,6 +453,8 @@ watch_david_fincher_movies(
```
If you find these limitations too strict let me know about your case.

When source code has custom commands but their definitions aren't known `gersemi` will warn about that. Warnings can be suppressed with `--no-required-definitions`/`required_definitions: false`.

#### How to format custom commands for which path to definition can't be guaranteed to be stable? (e.g external dependencies not managed by CMake)

You can provide stub definitions that will be used only as an input for gersemi. Example:
Expand Down

0 comments on commit 7cca1f7

Please sign in to comment.