Allow to customize the TODO marker string

This commit is contained in:
Alexander Kobjolke 2022-03-07 12:48:33 +01:00
parent 461f34a100
commit 4514d0f120
5 changed files with 61 additions and 28 deletions

View file

@ -44,13 +44,15 @@ Usage: annotator [OPTIONS] files...
A tool to semi-automatically add Coverity source-code annotations based on found defects.
-v --verbose be more verbose, pass multiple times to increase verbosity
-i --inplace replace source-file after inserting annotations
-V --version show version
--short-version show version
-h --help show usage information
-a --all handle all defects not just Newest
-C[NUM] --context[=NUM] specify how much context should be shown around a violation
-v --verbose be more verbose, pass multiple times to increase verbosity
-i --inplace replace source-file after inserting annotations
-V --version show full version information
--short-version show just the version number
-h --help show usage information
-a --all handle all defects not just Newest
-C[NUM] --context[=NUM] specify how much context should be shown around a violation
-t[STRING] --todo-marker[=STRING] override the default TODO marker with a custom string
-A FILE --annotations=FILE load automatic annotation rules
```
### In-place annotations
@ -65,3 +67,18 @@ By default the annotator will only handle *Newest* violations and not those that
are already contained within the Coverity database for some reason. However,
it's still possible to process all found violations by passing `-a` or `--all`
on the command-line.
### Insert annotations automatically
In case you have violations that always result in the same annotation over and
over again, you can supply one or more files that contain automatic decisions.
Each line may be one of the following:
```
Intentional (Rule "autosar_cpp14_a18_9_1") "reason why it's intentional"
FalsePositive (Rule "autosar_cpp14_a18_9_1") "reason why it's a false-positive"
ToDo (Rule "autosar_cpp14_a18_9_1")
```
Lines may be disabled by prefixing them with `#` or `--`.