Skip to content

Commit 75560a0

Browse files
committed
Update changelog and usage docs for autocorrect
1 parent 915f96b commit 75560a0

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

CHANGELOG.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ This changelog is loose. Versions are not semantic, they are incremental. Splint
44

55
## Unreleased
66

7-
**Big feature:** Mark each rule with safety information.
7+
**Big feature:** Safety and Autocorrection
88

9-
Every rule has been marked as safe or unsafe. Safe rules don't generate false positives and any suggested alternatives can be used directly. Unsafe rules may generate false positives or their suggested alternatives may contain errors. This doesn't mean much at the moment except for a note in the documentation, but I hope it will make it easier to add autocorrection in the future.
9+
Every rule has been marked as safe or unsafe. Safe rules don't generate false positives and any suggested alternatives can be used directly. Unsafe rules may generate false positives or their suggested alternatives may contain errors.
1010

11-
Alongside that, rules now track if they "autocorrect", which at the moment only means that they return a alternative form. This was included merely because I was already touching all of the rules.
11+
Rules that are safe may also perform autocorrection, which is tracked in `defrule` with `:autocorrect`. Rules may only perform autocorrection if they're safe.
1212

1313
The [Rules Overview](docs/rules-overview.md) has been expanded as well.
1414

docs/usage.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ Linting took 241ms, checked 115 files, 5 style warnings
3737
* `-r`, `--require FILE`: Require additional custom rules by loading specified files. Can be provided multiple times. (See [Writing a new rule][new rule] for further details.)
3838
* `--only RULE`: Run only the specified rule(s) or genre(s).
3939
* `--[no-]parallel`: Run Splint in parallel. Defaults to `true`.
40+
* `--autocorrect`: Automatically apply safe changes.
4041
* `-q`, `--quiet`: Print no diagnostics, only summary.
4142
* `-s`, `--silent`: Print no diagnostics or summary. Overrides `--summary`.
4243
* `--[no-]summary`: Print summary. Defaults to `true`.

0 commit comments

Comments
 (0)