Comments (4)
What we have in eqwalizer is actually not available in regular Erlang. We not only have line + column, but we actually have full start/end range for every construct in AST (the price is that the AST format is not backwards compatible). This allows the reported ranges to be precise, rather than just the single point information that Erlang compiler has - that said, this is still better than just line information.
from rebar3.
This isn't really hard and I wanted to give it a try for a partial implementation to see the style, it looks like this so far:
-module(rebar_fake).
-export([diagnostic/1]).
diagnostic(A) ->
X = add(5 / 0),
{X,X}.
add(X) -> X.
add(X, Y) -> X + Y.
Calling rebar3 escriptize
:
...
===> Compiling rebar
===> Compiling apps/rebar/src/rebar_fake.erl failed
apps/rebar/src/rebar_fake.erl:5:12:
diagnostic(A) ->
^-- variable 'A' is unused
apps/rebar/src/rebar_fake.erl:6:15:
X = add(5 / 0),
^-- evaluation of operator '/'/2 will fail with a 'badarith' exception
apps/rebar/src/rebar_fake.erl:11:1:
add(X, Y) -> X + Y.
^-- function add/2 is unused
Seems to be okay-ish.
See #2783
from rebar3.
(this draft PR is likely to look like garbage on errors on long long lines I guess, but it shows a very easy way to get improvements)
from rebar3.
Ah, I thought it did the range based on the error itself. Like if the error says there is an issue at when
then you know to highlight the whole when
.
from rebar3.
Related Issues (20)
- features_not_allowed for maybe_expr when rebar3 compile HOT 1
- rebar3 installed with local install crashes if you attempt to set VSN variable HOT 1
- Error in documentation for dialyzer options, unsupported warning listed HOT 4
- REBAR_CACHE_DIR and global config clash
- What is minimum required version of erlang to build rebar3? HOT 5
- the clean shell hooks will run twice? HOT 2
- limit the number of parallel build process HOT 3
- `hex cut` crashes HOT 3
- rebar3 compile is throwing errors on Apple Macbook Pro M1 Max HOT 1
- rebar3 compile fails in umbrella project if app does not have include and priv subdirectories HOT 1
- Released rebar3 escripts are compiled without RLX_LOG HOT 1
- Changes made to sys.config.src are not taking effect HOT 1
- Unable to download hex dependencies from a wsl setup behind a corporate firewall HOT 12
- rebar3 fails "no code in this directory" but mix deps.compile works fine HOT 2
- Implement hooks for get-deps commands HOT 9
- Command hex not found HOT 2
- rebar3 gives "Rebar dependency inets could not be loaded for reason no such file" HOT 9
- eloop error in old version (3.13.3) of rebar3 HOT 9
- Bootstrapping fails. HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rebar3.