2024-07-16
Highlights
OTP 27 support
The internal copy of the erlc frontend now uses maybe
, so it means we must remove OTP 25 build versions
eqWAlizer will now report uncovered function clauses
eqWAlizer will now report uncovered clauses, which means eqWAlizer is detecting that the corresponding pattern and guards cannot match the input type, and will not fully type-check it. In most cases, it means a spec or a type alias has to be updated. In some rarer cases, a clause may simply be dead code and can be deleted.
Improved diagnostics reported ranges
Various diagnostics that reported on a function call now report the range of the module:function
part not the full MFA.
undefined function (W0017) diagnostic now reports for the erlang
module too
Missing compile warn_missing_spec_all (W0012) diagnostic rework
We have a diagnostic to report that there is not a -compile(warn_missing_spec_all).
directive for a file.
It is disabled by default. To enable it, add a .elp_lint.toml
file to your project root, with contents
enabled_lints =['W0012']
This is now automatically read and used by ELP in language server mode, if it exists, and reloaded if it changes.
It can also have a disabled_lints
section.
elp lint
--one-shot
CLI argument
If a given diagnostic code applies to a file, apply a fix for all occurrences if asked.
It normally only does one at a time, so the command needs to be called multiple times.
This will be made more logical in future, removing the need for this flag.
Raw Change Log
2aed828 Turn on vscode publishing for OTP 26.2 (Alan Zimmerman)
cd5e3b6 tests: OTP-27 compatible (Ilya Klyuchnikov)
ffad3c7 Bump vscode extension version for imminent release (Alan Zimmerman)
6ecc191 CI: remove OTP 25 from the matrix (#38) (Alan Zimmerman)
8462fa6 bump version to 0.7.0 (Alan Zimmerman)
6de370c Protect against panics from DidChangeTextDocument (Alan Zimmerman)
e055181 BE: fix currently unused enum variant warning (Alan Zimmerman)
eb10270 BE: Improve reported range in slow functions diagnostic (Alan Zimmerman)
e0e969e Add UseRange to DiagnosticTemplate (Alan Zimmerman)
00418bc BE: Improve reported range for cross_node_eval (Alan Zimmerman)
f8398ba Fix CallTarget.range for auto-erlang remote call (Alan Zimmerman)
57da3b2 BE: Improve reported range for undefined_function diagnostic (Alan Zimmerman)
a6e35f4 BE: supply range without args to find_cal_in_function callback (Alan Zimmerman)
05ae919 Fix buck project model to prevent false positive undefined function (Alan Zimmerman)
2e532f3 BE: Improve Target.private_header documentation (Alan Zimmerman)
8a316b3 report undefined function for erlang functions too (Alan Zimmerman)
4b9183f rename elp lint '--enable-erlang-service-diagnostics' to '--enable-erlc-diagnostics' (Alan Zimmerman)
c03acbd Add --include-otp-diagnostics option to "elp lint" (Alan Zimmerman)
1495d56 3/n: ReplaceInSpec assist: fix match (Alan Zimmerman)
a134c3e 2/n: ReplaceInSpec assist: detect match (Alan Zimmerman)
6622118 Ad-hoc handling of is_float/is_integer guards (Victor Lanvin)
fae41b5 Snapshot uncovered clause FP with numbers (Victor Lanvin)
ccaf672 1/n: ReplaceInSpec assist: initial infra and serialization (Alan Zimmerman)
ce6aac6 Fix typo in function name (Roberto Aloi)
f4bdf05 Add ability to pass custom prefix to glean sub-command (Roberto Aloi)
83c3c7c Update documentation links to reflect new format (Roberto Aloi)
773b00a Better erlang_service protocol (Michał Muskała)
ce0b616 Remove obsolete version of the scanner (Roberto Aloi)
109fe14 BE: Improve MFA Serde serialization (Alan Zimmerman)
9cffefc ensure elp:fixme takes effect on whole-file diagnostics (Alan Zimmerman)
914adfc add ignore and fixme assists to W0012 compile warn missing spec all (Alan Zimmerman)
fedc591 BE: use Expect for expected fix test results (Alan Zimmerman)
81c617b Fix offset calculation for sigils (Roberto Aloi)
ceef61e BE: Set lints_from_config while configuring lints (Alan Zimmerman)
efbd231 BE: rename DiagnosticConditions::explicit_enable to default_disabled (Alan Zimmerman)
b45363b Include event start time in telemetry (Alan Zimmerman)
db2cdef BE: remove disabling DiagnosticCode::MissingCompileWarnMissingSpec in tests (Alan Zimmerman)
ac9103b BE: Improve DiagnosticConfig initialization (Alan Zimmerman)
02bb478 reload LintConfig on config change (Alan Zimmerman)
e8ff008 server: always read .elp_lint.toml
(Alan Zimmerman)
b13c59b elp lint: add test for lints explicitly enabled in config (Alan Zimmerman)
b952c15 switch fully to DiagnosticDescriptor for compile_warn_missing_spec diagnostic (Alan Zimmerman)
e0d2941 require compile_warn_missing_spec_all (Alan Zimmerman)
0d8f7cf Explictly filter explicitly enabled diagnostics (Alan Zimmerman)
3c3a5f5 BE: clarify include_otp flag when requesting diagnostics (Alan Zimmerman)
1195042 Add DiagnosticConditions.explicit_enable (Alan Zimmerman)
d041949 Snapshot: keep entire LintConfig, not just LintsFromConfig (Alan Zimmerman)
55e7d04 Move calculation of enabled diagnostics from config into ide crate (Alan Zimmerman)
881b659 Fix up typos (Ayoub Mansar)
80cadd3 Fix dependabot alert for vscode client (Alan Zimmerman)
3b84b94 add --one-shot
to elp lint to apply all fixes at once (Alan Zimmerman)
c91b944 Shallow Dialyzer support on CLI (Tom Davies)
0fe3033 Handle sigil prefix/suffix in the scanner (Roberto Aloi)
50ba583 Update HIR for more-than-triple quote strings (Alan Zimmerman)
f8b673e Extend external scanner for triple quoted sigil strings (Alan Zimmerman)
1d7994a Add external scanner for triple quoted strings (Alan Zimmerman)
ba6e272 rename String::TripleQuoted to String::Verbatim (Alan Zimmerman)
6392db3 Update HIR for doc attribute (Alan Zimmerman)
f2be41c Update HIR for moduledoc attribute (Alan Zimmerman)
5968f13 6/n Update HIR for string sigils: term (Alan Zimmerman)
f3b2402 5/n update HIR for string sigils: type_expr (Alan Zimmerman)
60f7eb5 4/n Update HIR for string sigils: pat (Alan Zimmerman)
678752a 3/n Update HIR for string sigils: generalize lower_str_or_sigil (Alan Zimmerman)
e5fbb1a 2/n Update HIR for string sigils: expr (Alan Zimmerman)
1c24e7a 1/n Update HIR for string sigils (Alan Zimmerman)
e199f75 update grammar for string sigils (Alan Zimmerman)
eece0cc Update HIR to explicitly represent triple quoted strings (Alan Zimmerman)
ec0af1c Update grammar for triple quoted strings (Alan Zimmerman)
c9f1e31 Fix matching in scanner for triple quoted string continuation (Roberto Aloi)
e76a54a Update third-party grammar (Roberto Aloi)
fb463fe Fix use of maybe in macro argument (Roberto Aloi)
287c390 compiler: implementation of EEP-59 (Roberto Aloi)
5465e15 Implement warning for adjacent string literals without intervening white space (Roberto Aloi)
3625595 Preprocessor: Fail compilation for unknown functions (Roberto Aloi)
2e4fe37 Shorten code by list comprehension (Roberto Aloi)
aa86a80 Emit warning for triple quote chars (Roberto Aloi)
8c14904 Rename erl_scan_otp27 into elp_scan (Roberto Aloi)
2d67e73 Update scanner to always count of carriage return as zero (Roberto Aloi)
9541cb9 Export location type (Roberto Aloi)
f156ab6 Always consider maybe and else as keywords (Roberto Aloi)
599cf89 Modify erl_scan to use bytes (Roberto Aloi)
3e45eec Remove unnecessary has_fun (Roberto Aloi)
c2577d4 Remove ssa checks (Roberto Aloi)
48f021e Remove unused code (Roberto Aloi)
6b9ebca Format erl_scan (Roberto Aloi)
5495e9e Import latest erl_scan from OTP 27, strip away docs (Roberto Aloi)
d82f86f Error index entry for L1318 (Roberto Aloi)
8402121 New error codes for erl_lint/elp_lint (Roberto Aloi)
726ca97 Restore --force-warn-missing-spec-all flag (Roberto Aloi)
95b4ccb Upgrade elp_lint to latest available version (Roberto Aloi)
90398cb Implementation of EEP-59 Documentation Attributes (Roberto Aloi)
9b72b05 Remove trailing dot from erl_parse error messages (Roberto Aloi)
e2bac67 Fix bugs and distinguish between Sigil Type and Sigil Prefix (Roberto Aloi)
04d346e Remove ~r
and fancy delimiters (Roberto Aloi)
aa99f88 Implement string sigils according to EEP 66 (Roberto Aloi)
37410c3 Remove unused argument (Roberto Aloi)
2b6dc11 Upgrade braces and ws dependencies (Roberto Aloi)
a303f92 CI: fix macOS x86_64 builds for eqWAlizer (#34) (Ali Sabil)
f7a3a14 Provide test example of using lints from config (Alan Zimmerman)
c2206f4 Add link to Slack channel in issue template (Roberto Aloi)
26960de Add telemetry for too-slow events (Alan Zimmerman)
a043fdc Add ELP installation instructions for Vim (Roberto Aloi)
9326281 Suggest elp shell when running eqwalize-all (Victor Lanvin)
bab39dc Make erlang service scoped per project and auto-started (Michał Muskała)