Skip to content

Commit

Permalink
Merge pull request #394 from timjnh/main
Browse files Browse the repository at this point in the history
Custom offenses formatter docs fix
  • Loading branch information
gmcgibbon authored Mar 8, 2024
2 parents 9ff1c78 + 191b58e commit f52fb63
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ You can also reference the name of a gem.

While `packwerk` ships with its own offense formatter, you may specify a custom one in your configuration file via the `offenses_formatter:` key. Your custom formatter will be used when `bin/packwerk check` is run.

Firstly, you'll need to create an `OffensesFormatter` class that includes `Packwerk::OffensesFormatter`. You can use [`Packwerk::Formatters::OffensesFormatter`](lib/packwerk/formatters/offenses_formatter.rb) as a point of reference for this. Then, in the `require` directive described above, you'll want to tell `packwerk` about it:
Firstly, you'll need to create an `OffensesFormatter` class that includes `Packwerk::OffensesFormatter`. You can use [`Packwerk::Formatters::DefaultOffensesFormatter`](lib/packwerk/formatters/default_offenses_formatter.rb) as a point of reference for this. Then, in the `require` directive described above, you'll want to tell `packwerk` about it:
```ruby
# ./path/to/file.rb
class MyOffensesFormatter
Expand Down

0 comments on commit f52fb63

Please sign in to comment.