Skip to content

Commit

Permalink
Add usage documentation for count-offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
davidstosik committed Mar 29, 2023
1 parent 10caa39 commit 116876d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* [Understanding how to respond to new violations](#understanding-how-to-respond-to-new-violations)
* [Recording existing violations](#recording-existing-violations)
* [Understanding the package todo file](#understanding-the-package-todo-file)
* [Counting offenses](#counting-offenses)
* [Loading extensions](#loading-extensions)

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

Violations exist within the package that makes a violating reference.


# Counting Offenses

You can generate a count of all offenses by running:

bin/packwerk count-offenses

This will output a list of packages with their respective offense count.

# Loading Extensions

You can optionally specify ruby files that you'd like to be loaded with `packwerk` by specifying a `require` directive in `packwerk.yml`:
Expand Down
1 change: 1 addition & 0 deletions lib/packwerk/cli.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ def usage
Subcommands:
init - set up packwerk
check - run all checks
count-offenses - displays an offense count per package
update-todo - update package_todo.yml files
validate - verify integrity of packwerk and package configuration
version - output packwerk version
Expand Down

0 comments on commit 116876d

Please sign in to comment.