Skip to content

Commit 16e7f04

Browse files
committed
Add usage documentation for count-offenses
1 parent 10caa39 commit 16e7f04

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

USAGE.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
* [Understanding how to respond to new violations](#understanding-how-to-respond-to-new-violations)
2121
* [Recording existing violations](#recording-existing-violations)
2222
* [Understanding the package todo file](#understanding-the-package-todo-file)
23+
* [Counting offenses](#counting-offenses)
2324
* [Loading extensions](#loading-extensions)
2425

2526
## What problem does Packwerk solve?
@@ -239,6 +240,15 @@ Above is an example of a constant violation entry in `package_todo.yml`.
239240

240241
Violations exist within the package that makes a violating reference.
241242

243+
244+
# Counting Offenses
245+
246+
You can generate a count of all offenses by running:
247+
248+
bin/packwerk count-offensess
249+
250+
This will output a list of packages with their respective offense count.
251+
242252
# Loading Extensions
243253

244254
You can optionally specify ruby files that you'd like to be loaded with `packwerk` by specifying a `require` directive in `packwerk.yml`:

lib/packwerk/cli.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ def usage
120120
Subcommands:
121121
init - set up packwerk
122122
check - run all checks
123+
count-offenses - displays an offense count per package
123124
update-todo - update package_todo.yml files
124125
validate - verify integrity of packwerk and package configuration
125126
version - output packwerk version

0 commit comments

Comments
 (0)