Skip to content

Commit

Permalink
docs: describe how to ignore the structs and how to use metadata
Browse files Browse the repository at this point in the history
  • Loading branch information
hauleth committed Oct 15, 2021
1 parent 3355712 commit d0fcd29
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/mix/tasks/compile.unused.ex
Expand Up @@ -66,10 +66,21 @@ defmodule Mix.Tasks.Compile.Unused do
want to ignore whole module, then you can just use `Foo` (it also works for
regular expressions).
To ignore warnings about unused structs you need to use "special" syntax in
form of `{StructModule, :__struct__, 0}`.
### Documentation metadata
Functions that have `export: true` in their metadata will be automatically
treated as exports for usage by external parties and will not be marked as
unused.
## Options
- `severity` - severity of the reported messages, defaults to `hint`.
Other allowed levels are `information`, `warning`, and `error`.
- `warnings-as-errors` - if the `severity` is set to `:warning` and there is
any report, then fail compilation with exit code `1`.
"""

alias Mix.Task.Compiler.Diagnostic
Expand Down

0 comments on commit d0fcd29

Please sign in to comment.