Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
home:Ledest:erlang
dialyxir
dialyxir-1.0.0-git.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File dialyxir-1.0.0-git.patch of Package dialyxir
diff --git a/README.md b/README.md index 89f1afc..043ca32 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ end #### Explanations -Explanations are available for classes of warnings by passing the `--explain warning_name` flag. It will include a description about the type of warning, as well as a small example that would also cause that warning. Poor explanations and examples should be considered issues in this library, and pull requests are very welcome! The warning name is returned from the `--format short` and `--format dialyzer` flags. List available warnings with `--list`. +Explanations are available for classes of warnings by executing `mix dialyzer.explain warning_name`. It will include a description about the type of warning, as well as a small example that would also cause that warning. Poor explanations and examples should be considered issues in this library, and pull requests are very welcome! The warning name is returned from the `--format short` and `--format dialyzer` flags. List available warnings with `mix dialyzer.explain`. #### Formats @@ -208,11 +208,27 @@ end ``` ### Ignore Warnings +#### Dialyxir defaults By default `dialyxir` has always included the `:unknown` warning option so that warnings about unknown functions are returned. This is usually a clue that the PLT is not complete and it may be best to leave it on, but it can be disabled entirely by specifying `remove_defaults: [:unknown]` in your config. A better option is to ignore the specific warnings you can't fix (maybe due to a bug upstream, or a dependency you just don't want to include in your PLT due to time/memory in building the PLT file.) +#### Module attribute + +Dialyzer has a built-in support for ignoring warnings through a `@dialyzer` module attribute. For example: + +```elixir +defmodule Myapp.Repo do + use Ecto.Repo, otp_app: :myapp + @dialyzer {:nowarn_function, rollback: 1} +end +``` + +More details can be found in the [erlang documentation](http://erlang.org/doc/man/dialyzer.html#requesting-or-suppressing-warnings-in-source-files) + +#### Ignore file + If you want to ignore well-known warnings, you can specify a file path in `:ignore_warnings`. ```elixir
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor