summaryrefslogtreecommitdiff
path: root/src/rebar_prv_xref.erl
Commit message (Collapse)AuthorAgeFilesLines
* Unicode support in all the placesFred Hebert2017-08-061-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done through 3 main change groups: - replacing `~s` by `~ts` in format strings, so that strings that contain unicode are properly printed rather than crashing - adding the `unicode` argument to all function of the `re` module to ensure transformations on strings containing unicode data are valid instead of crashing (see issue #1302) - replacing `ec_cnv:to_binary/1` and `ec_cnv:to_list/1` with matching functions in `rebar_utils`. The last point has been done, rather than modifying and updating erlware commons, because binary and list conversions can be a contentious subject. For example, if what is being handled is actually bytes from a given binary stream, then forcing a byte-oriented interpretation of the data can corrupt it. As such, it does not appear safe to modify erlware commons' conversion functions since it may not be safe for all its users. Instead, rebar3 reimplements a subset of them (only converting atoms and chardata, ignoring numbers) with the explicit purpose of handling unicode string data. Tests were left as unchanged as possible. This may impact the ability to run rebar3's own suites in a unicode path, but respects a principle of least change for such a large patch.
* Don't crash when determining the source of undefined functions in stripped ↵Guilherme Andrade2017-08-051-4/+13
| | | | | | | | | | modules This can be reproduced by running xref analysis against a rebar3 plugin project which doesn't list rebar3 as an explicit dependency -- calls to certain bundled modules ('rebar_state', 'rebar_api', 'ec_cnv', ...) will result in a failed pattern match as these modules appear to have had their abstract code stripped.
* Fix cleanup_code_path for xref compile hookMikhail Kalashnikov2017-07-261-1/+2
|
* Prevent xref crashes with undef behavioursFred Hebert2017-06-131-2/+9
| | | | | | | | | When a given behaviour module does not exist, rebar3 brutally crashes. This patch makes it so instead, there is a warning output menitoning the missing behaviour, and this one is omitted from the unused function calls check. This means that unused calls will instead be shown for the module implementing a non-existing behaviour, as if no behaviour were declared in the first place.
* Fix xref compile hook on depsFred Hebert2017-06-071-2/+5
| | | | | | | | | | | If xref analysis is being run by a dependency during its compilation phase, the xref provider will try to add that deps' parents to the check job while the ebin/ directories for them do not exist. This causes a crash. This patch makes it so directories are only added if they are existing, preventing failure on any compile hook for dependencies and allowing successful compilation as a best effort.
* Fix rebar3 dialyzer warningsFred Hebert2016-11-191-1/+1
| | | | Some tricky changes in there but should be okay
* Add support for behaviors, and not just behavioursBrujo Benavides2016-09-281-1/+2
|
* Add support for xref_ignoresLouis-Philippe Gauthier2016-02-121-10/+12
|
* fix dialyzer warnings, except 'no local return' warningsTristan Sloughter2015-08-081-1/+1
|
* fix bareness issuesFred Hebert2015-05-311-1/+1
| | | | | | - Crashes in providers lib when no providers in a namespace are bare - Making sure bareness matches semantics; i.e. a bare provider is visible, a non-bare provider is hidden.
* remove uses of 'case catch'Tristan Sloughter2015-05-101-5/+5
|
* real bootstrappingTristan Sloughter2015-04-221-1/+1
|
* track and cleanup code paths for different contextsTristan Sloughter2015-04-211-17/+5
|
* Fixes #306: help text consistencyFred Hebert2015-04-021-1/+1
|
* Fix dialyzer warningsJames Fish2015-03-181-1/+1
|
* use PRV_ERROR for formattable errorsFred Hebert2015-03-161-1/+2
| | | | Also expose it in rebar_api
* copy project apps to deps output dir for compilationTristan Sloughter2015-02-281-1/+0
|
* Add xref support for multi-app projectsKelly McLaughlin2015-02-051-1/+2
| | | | | | | Add xref support for multi-app projects. Instead of only adding the top-level ebin directory to the xref server use rebar_state:project_apps/1 to enumerate the applications for the project and add the ebin directory for each one.
* Add xref provider for cross reference analysisKelly McLaughlin2015-02-051-0/+296
* Add a provider for the xref tool for running cross reference analysis on a project. Most of the code has been ported directly from the rebar2 rebar_xref module with some modification and cleanup to support testing. * Port over the eunit test suite from rebar2, but convert it to common_test. The testing is the same, but now the erlang term output is examined to determine if the test run is successful instead of scanning the console output for the expected strings.