aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer.erl
AgeCommit message (Collapse)Author
2019-05-07dialyzer: Remove quotes around operatorsHans Bolinder
2019-05-07dialyzer: Add an --no_indentation optionHans Bolinder
By default Dialyzer tries to improve the readability of warnings. Newlines are inserted before and inside types, signatures, and Erlang code. Sometimes the newlines look misplaced. The raw format (option --raw) is not affected. Use the new --no_indentation option get the old behavior (no inserted line breaks). A note on the implementation. The types &c present in the warning tuples are parsed, and then formatted using erl_pp, the Erlang Pretty Printer. The alternative, to create message tuples with formatted types, turned out to more complicated, and has no real benefits. Also notice that the fixes for binaries (commit 9db8a098) and union elements (commit a1e51d12) are required. As a consequence, messages created before these commits using the --raw option cannot always be indented.
2019-04-24dialyzer: Improve the warning tagged 'fun_app_args'Hans Bolinder
The mismatching argument positions are included.
2018-05-25dialyzer: Refine the test for overspecified functionsHans Bolinder
The -Woverspecs (-Wspecdiffs) option generates warnings in a few more cases. The refinement is analogous to the test that -Wunderspecs already does: it checks if the contract has nothing in common with some element (see erl_types:t_elements/1) of the success typing.
2017-09-05dialyzer: Improve handling of UnicodeHans Bolinder
2017-06-09dialyzer: Improve handling of UnicodeHans Bolinder
2016-11-23Correct copyright and license on dialyzer filesRichard Carlsson
2016-11-22dialyzer: Substitute 'opacity' for 'opaqueness'Hans Bolinder
Suggested by Kostis.
2016-11-22dialyzer: Improve a warning messageHans Bolinder
Messages like "Invalid type specification for function para3:exp_adt/0. The success typing is () -> 3" now look like "The specification for para3:exp_adt/0 has an opaque subtype para3_adt:exp1(para3_adt:exp2()) which is violated by the success typing () -> 3". The old message did not give any clue as to what invalidated the contract, namely the opaque subtype.
2016-07-26Improve format_warning/1 specBrujo Benavides
Let it handle `dial_warning()` input as well, to match what `format_warning/2` expects.
2016-04-28dialyzer_dataflow: Add map supportMagnus Lång
2015-06-18Change license text to APLv2Bruce Yinhe
2015-05-20dialyzer: Document dialyzer:gui() option 'check_plt'Hans Bolinder
* Mention the option 'check_plt' among gui() options. * No longer check a PLT twice when the analysis type is 'plt_check'. * No longer raise a case_clause error when checking a PLT finds warnings. Thanks to James Fish.
2015-01-14dialyzer: Introduce module local suppression of warningsHans Bolinder
The -dialyzer() attribute can be used for suppressing warnings in a module by specifying functions or warning options. It can also be used for requesting warnings in a module.
2014-03-24Use the ordsets:ordset(T) type instead of defining a local oneKostis Sagonas
2014-03-20Return warnings for unknown types and functions in Erlang ModeHans Bolinder
The warnings about unknown types and functions are now returned when calling Dialyzer from Erlang, in particular from an escript. When calling Dialyzer from the command line the warnings about unknown types and functions are output last as before; and when using the GUI the warnings are displayed in a pop-up window, as before.
2014-01-21[dialyzer] Re-work the handling of opaque typesHans Bolinder
It is now OK to inspect and modify the internals of opaque types within the scope of the module. The contracts are used for decorating types with opaqueness when it is harmless to do so. The opaqueness is propagated by the typesig module and also by the dataflow module. A lot of details have been fixed or updated. In particular the modules erl_types and erl_bif_types have been modified extensively. The version in vsn.mk has been updated to 2.7. The reason is a modification of #opaque{} in erl_types. Dialyzer seems to be about five percent slower than it used to be.
2013-11-13Remove the GS-based GUI of DialyzerKostis Sagonas
R17 will come without support for 'gs' so the old gs-based GUI of dialyzer has been removed.
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-03-06Include module, function and arity in Dialyzer's "overlapping domain" warningsMagnus Henoch
The function name can give information that the line number doesn't, for example when using a parse transform that creates new functions.
2012-10-03Merge branch 'maint'Henrik Nord
2012-09-26Respect {plt_check,false} option when using dialyzer:run/1Stavros Aronis
2012-09-24dialyzer: Do not output warnings for unused funsHans Bolinder
Dialyzer no longer outputs warnings for unused anonymous functions ("funs"). Warnings are still output for unused functions. Funs in functions with -nowarn_unused_function attributes generated warnings for unused functions. Unused list comprehensions also generated warnings for unused funs.
2011-11-18Wrap up behaviours patch for DialyzerStavros Aronis
Enable warnings by default, add two options for suppressing them, fix warning formatting and update testsuites.
2011-11-18Detection of callback-spec discrepanciesStavros Aronis
2011-11-18Behaviour callback discrepancy detection for DialyzerStavros Aronis
2011-03-11More descriptive warning when a tuple pattern matches a typed recordStavros Aronis
2011-03-11Better blame assignment when a spec is erroneousStavros Aronis
Applies to the specification of the return value of a function.
2011-03-11Generate better warnings for failing guardsStavros Aronis
2011-03-04Merge branch 'sa/dialyzer-fix-guards' into devNiclas Axelsson
* sa/dialyzer-fix-guards: Fix warnings about guards containing not Fix errors in the handling of 'and'/'or' guards Cosmetic changes OTP-9099
2011-01-20Add a --fullpath option to DialyzerKostis Sagonas
This change adds a --fullpath option to Dialyzer, which makes the warning messages contain the full path of the corresponding file. Original patch submitted by Magnus Henoch (legoscia) on 15/9/2010 and cooked to death in the 'pu' branch all this time. The patch was essentially correct and most of it has been used as is, but there have been some changes to make the code slightly prettier, avoid some code duplication, and add documentation to dialyzer's doc files and to its help message.
2011-01-18Fix warnings about guards containing notStavros Aronis
The wording of warnings about unsatisfiable guards that used 'not' was incorrect (the 'not' was not mentioned and it appeared as "Guard test is_atom(atom()) can never succeed").
2010-11-30dialyzer: Add support for multiple PLTsMaria Christakis
This new feature is able to take multiple PLTs, merge them during the start of the analysis, and work from there. This works provided that the PLTs do not have a module with the same name appearing in more than one PLT. The PLTs are created in the usual way: dialyzer --build_plt --output_plt PLT_1 FILES_TO_INCLUDE ... dialyzer --build_plt --output_plt PLT_N FILES_TO_INCLUDE and then can be used in either of the following ways: dialyzer FILES_TO_ANALYZE --plts PLT_1 ... PLT_N or: dialyzer --plts PLT_1 ... PLT_N -- FILES_TO_ANALYZE (Note the -- delimiter in the second case)
2010-11-26Fix typo in warningsStavros Aronis
2010-11-09dialyzer: Speed up analysis of nested list comprehensionsKostis Sagonas
Nested list comprehensions are translated into strongly connected funs but dialyzer ignored this. This meant that self-recursive analysis was normally executed for each fun and the whole fixpoint took some time to calculate. This patch adds every fun found in constraint generation to the SCC that is under analysis and then solves the SCC as a whole. Possible issues: - The returned dict contains more entries than usual. This triggered a bug in contract checking that is dealt with is this patch as well (dialyzer_contracts.erl). - As it's not easy to tell apart real fun SCCs from simple funs it performance might be hampered in the simple funs case. While doing these changes, also added and strengthened some specs. In addition, incorporated a modified patch by Ahmed Omar that fixes a bug in dialyzer_analysis_callgraph module that kept the files of only one selected directory in dialyzer's GUI.
2010-06-08Various changes to dialyzer-related files for R14.Kostis Sagonas
Bumped version number and wrote RELEASE_NOTES. Included all changes described in release notes. Some spec-related changes to some files in lib/hipe/cerl.
2010-02-17Merge branch 'ks/hipe' into ccase/r13b04_devErlang/OTP
* ks/hipe: dialyzer: Fix system_limit exception in race analysis syntax_tools: Add types and specs for most exported functions syntax_tools: Support the --enable-native-libs configure option syntax_tools: Remove $Id$ annotations dialyzer: New version for the R13B04 release hipe: Miscellaneous additions typer: New version for the R13B04 release Fix a HiPE compiler bug evaluating an expression that throws system_limit OTP-8460 ks/hipe
2010-02-14dialyzer: New version for the R13B04 releaseKostis Sagonas
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP