2026-11-202026-11-20
本次更新让 eqWAlizer 可以分批接入:新增 elp eqwalizer-onboard 命令,自动找出项目中已能通过类型检查的模块并逐一纳入,不必先做大扫除;官网也配套上线了在 CI 上逐模块铺开的教程。新增规则 W0097 manualintegerrangecheck,把 isinteger(X), X >= Min, X =< Max 这类写法收敛为 is_integer(X, Min, Max)。修复方面:OTP 装在含重音或非 Latin-1 字符的路径下也能正常识别;W0095 不再误报传给宏的变量;头部分子不匹配的诊断保留宏带来的子句分隔。VS Code 扩展同步升到 0.56.0。
2026-11-192026-11-19
这版 elp 最实用的改动是 elp lint 新增 --format github,诊断能以 GitHub Actions 注释形式直接标在 PR 上(#329)。同时加入新告警 W0096 mapcomprehensiontofromkeys,提示把 map 推导式改写为 maps:from_keys/2。
OTP 侧已理解 29 的多值推导式与 isinteger/3 守卫,并避开 OTP 30 移除的 erlinternal:oldtypetest/2。eqWAlizer 无法转换的代码现在会作为诊断报出,不再静默跳过。配置读取或解析失败时 elp lint 以状态码 2 退出,CI 会直接失败,而不是带着错误配置继续跑。
告警精度上,W0016 尊重 -compile(nowarndeprecatedfunction),W0035 不再在值引用 fold 变量时误荐 maps:fromkeys/2,W0093 的 unusedheader 改指头文件首行代码。底层内置了 tree-sitter-erlang 0.22.0,rowan 升到 0.17.0,daemon 响应改为原子发送。
2026-11-162026-11-16
✨ Highlights
🎨 Format Erlang files with erlfmt in VS Code
The VS Code extension can now format Erlang files using erlfmt, with nothing extra to install.
- 📄 Format Document and ✂️ Format Selection both work, and so does format on save:
``json
"[erlang]": {
"editor.formatOnSave": true
}
`
- 📦 erlfmt 1.8.0 is bundled with the extension. It runs on your own Erlang installation and works on Windows too.
- ⚙️ Two new settings:
- elpClient.erlfmt.path points at your own erlfmt, for example to pin the version your CI uses
- elpClient.erlfmt.args passes extra options, for example ["--print-width=120"]
- 🛟 If erlfmt fails, your file isn't touched and the error goes to the Erlang ELP output channel.
🆕 New diagnostics
| Code | Name | What it catches |
|------|------|-----------------|
| W0087 | discouraged_type | Types your project chooses to discourage (dynamic(), term(), …) |
| W0088 | unnecessaryfunctionarg | Arguments every clause ignores and only local calls pass |
| W0089 | undefined_module | Calls like Mod:F() / apply/3 where the module doesn't exist |
| W0090 | unavailable_module | Same calls to a module from an app that isn't a dependency (Buck only) |
| W0091 | missingfunctionspec | Functions without a -spec |
| W0092 | unusedexportedtype | Exported types nothing references |
| W0093 | unused_header | Header files no module or header includes |
| W0094 | redundantctcallback | Common Test callbacks that only do what Common Test does by default |
| W0095 | usedignoredvariable | _Var variables that are actually used |
W0087 doesn't report anything until you list the types to discourage in .elp_lint.toml:
`toml
[discouraged_type]
types = ["dynamic()", "term()", "map()"]
`
⚙️ Configuration
- 🎯 excludemodules per linter**: skip one linter for some modules, glob patterns allowed:
`toml
[linters.nopersistentterm]
excludemodules = ["mycache", "legacy_*"]
`
- 🧪 [eqwalizer] includetests: set it to false to type-check only production code when enableall = true.
- 📦 --rebar now reads .elp.toml: settings such as [eqwalizer], [otp] exclude_apps and [daemon] now apply to rebar3 projects loaded with --rebar.
- 💤 The daemon is off by default in open-source builds: elp lint and elp eqwalize* run standalone unless you pass --connect.
🛠️ CLI
- 🔧 elp lint --apply-fix applies one fix per diagnostic. Before, when a diagnostic offered several fixes, the last one silently won. Now it applies the first fix, or the one you pick with the new --fix-id:
`shell
elp lint --diagnostic-filter W0025 --apply-fix --fix-id <FIX_ID>
`
When several fixes are available, the output lists their ids.
- 🩹 Invalid lint file paths are reported instead of crashing ELP.
🧭 Language server and IDE
- 🔍 Find references and rename for genstatem state functions (statefunctions mode). The state atom in {next_state, State, Data} now links to State/3, and the unused-code linters see those calls too.
- 🔗 W0045 (duplicate module) now shows related locations for the other definitions.
- 📡 ELP moved from LSP 3.16 to LSP 3.18.
- 🧩 VS Code extension 0.55.0: erlangDap.erlangInstallationPath is now elpClient.erlangInstallationPath. The old name still works but is deprecated. The setting picks the Erlang installation that the debugger, erlfmt, test runs and the language server use.
🐛 Fixes
- 🪵 Projects that use lager: ELP no longer runs lager_transform, whose latest release (3.9.2) generates invalid code on OTP 24 and later. eqWAlizer can check modules that log with lager again.
- 🧪 Nested Common Test groups written as {Name, Tests} (no properties) are understood, so W0091 no longer flags their testcases.
- 🔤 W0015: no more false positives for macro calls guarded by preprocessor conditions. Thanks @Pruthvirajchawan (#300) 🙏
- 🧮 Several variable-scoping fixes for parenthesised expressions, macro patterns and maybe.
- 🎯 Macro bodies: types in macro arguments and definitions are resolved, and matches inside a macro body are reported at the macro call.
🧹 Retired and changed linters
- 🪦 W0010 (unusedfunctionarg) is retired. Use the compiler's L1268 (unused variable) and its quick-fix instead.
- 🪦 W0018 (unexpected_separator) is retired because it duplicated a compiler syntax error.
Existing % elp:ignore comments and .elp_lint.toml entries for both codes still parse.
- 🔕 W0043 (nonstandardintegerformatting) is now disabled by default: it reformatted years and ports, e.g. 2026 became 2_026. Its docs explain how to turn it back on.
🏎️ Under the hood
Big internal rework of project and file loading. Projects, apps and files are now salsa inputs, ELP has its own file map instead of vfs, and projects on the same OTP installation share one OTP project. W0077 is faster too, plus the usual round of dependency updates. 📦
Full Changelog
45a9286a9e Update eetf from 0.10.0 to 0.11.0 (David Tolnay)
0304958ad0 Update eetf from 0.9.0 to 0.10.0 (David Tolnay)
3aef168615 Remove llms-gk entries for GKs that are on for everyone [B] [A] (generatedunixname1870814910625384)
841941f558 Add W0095 usedignoredvariable (Roberto Aloi)
a84ddf146f Add Var name predicates for , Name and __Name` (Roberto Aloi)
c47586475c Accept Common Test group definitions without properties (Daniel Gorin)
cf04512fcc Add W0094 redundantctcallback (Roberto Aloi)
4b4c32f6b2 Update raapquery-group-macro from 0.0.339 to 0.0.340 (David Tolnay)
6a5b0b1435 Update raapquery-group-macro from 0.0.338 to 0.0.339 (David Tolnay)
6e97935ad2 Update raapquery-group-macro from 0.0.337 to 0.0.338 (David Tolnay)
5a083ce7a6 Update raapquery-group-macro from 0.0.336 to 0.0.337 (David Tolnay)
0d9f397d2c Update raapquery-group-macro from 0.0.335 to 0.0.336 (David Tolnay)
afadb93424 Update raapquery-group-macro from 0.0.334 to 0.0.335 (David Tolnay)
ecaf6fbcd4 Update raapquery-group-macro from 0.0.333 to 0.0.334 (David Tolnay)
8c3b13fe60 Update raapquery-group-macro from 0.0.332 to 0.0.333 (David Tolnay)
0c76449879 Update raapquery-group-macro from 0.0.331 to 0.0.332 (David Tolnay)
4b2f87909c Update raapquery-group-macro from 0.0.330 to 0.0.331 (David Tolnay)
8c0787dff0 Update raapquery-group-macro from 0.0.329 to 0.0.330 (David Tolnay)
560390da52 Update raapquery-group-macro from 0.0.328 to 0.0.329 (David Tolnay)
b7d1c52856 Update notify from 8.2.1 to 8.2.2 (generatedunixname2066905484085733)
b4621ddd0d Update timeout-readwrite from 0.3.3 to 0.4.0 (David Tolnay)
5199c7d616 Update env_filter from 1.0.1 to 2.0.0 (David Tolnay)
d8a906c50e Update env_filter from 0.1.4 to 1.0.1 (David Tolnay)
486eda3294 Skip lager_transform in the Erlang Service (Roberto Aloi)
db07e9c2f1 Skip the ELP CI matrix for website-only pull requests (Roberto Aloi)
d8a0a58e1a Bump OSS VS Code extension version to 0.55.0 (Roberto Aloi)
0c8f96404d Rename erlangDap.erlangInstallationPath to elpClient.erlangInstallationPath (Roberto Aloi)
296b490c58 Run GitHub CI on pushes to main only (Roberto Aloi)
32a97e2692 Format Erlang files with erlfmt (#324) (Roberto Aloi)
da6535ea5b Find references to gen_statem state functions (Roberto Aloi)
4c5a55ecfe Add W0093 unused_header (Roberto Aloi)
4b6c6be3c2 Retire WA036 (onboard_appatic) (Roberto Aloi)
d6621f1db8 Search only the files that name the module in W0077 (unusedexportedfunction) (Roberto Aloi)
2feea010c7 Retire W0018 (unexpected_separator) (Roberto Aloi)
c74a224651 Explain how to fix W0060 (boundvarin_lhs) (Roberto Aloi)
6ca46cad03 Report invalid lint file paths without panicking (Roberto Aloi)
713d18
2026-10-142026-10-14
ELP 0.21.0 更新:eqwalizersupport 现已内置到所有项目类型,开箱即用,附带更精确的 OTP 规格与类型覆盖,误报明显减少;需要用自家覆盖时,通过 eqwalizerspecs/eqwalizertypes 写上要改的条目即可,会叠加在内置规则之上。VS Code 扩展的 EDB 调试器同时兼容 OTP 28 与 OTP 29,并按你的版本自动挑选对应的构建。多核机器上性能最高提升 3.4 倍,可用 ELPERLANGSERVICESCHEDULERS 调整调度数。守护进程起不来时不再白等两分钟,直接退回独立模式运行。此外,-doc/-moduledoc 的悬浮文档响应更快,rebar3 Common Test 分组现在能正确执行,W0003、W0017、W0059、W0081 等告警的误报有所收敛,-deprecated 属性里的 F/A 写法也不再报错。
2026-10-052026-10-05
本次新增五项诊断:W0082 建议在类型标注中用 term() 取代 any(),并提供快速修复;W0083 要求类型定义写在模块里而非头文件;W0084 强制模块属性按可配置顺序排列;W0085 提示调用了并非自身依赖的应用的远程函数;W0086 标记 Common Test 中已废弃的 ?config/2 宏,默认关闭,需在 .elp_lint.toml 里启用。
elp lint 现在连同头文件一起检查,W0015 能报出头文件中的未定义宏;W0020 会区分直接包含与传递包含,减少误报;重复模块名改由 W0045 针对测试文件报告。-ifdef(TEST) 段落按测试代码对待,临时诊断码可用 % elp:ignore 抑制,exclude_apps 支持通配符。
eqWAlizer 改进了 isrecord/3 guard、map 模式和 maybe 表达式的类型推导,元组子类型判断也更简单快速。命令行上,elp lint 与 elp eqwalize 默认连接常驻 daemon 流式取诊断,加 --no-connect 可独立运行。
2026-08-102026-08-10
2026-08-14 是 2026-08-07 的重新发布版本,内容本身没有变化,只是更新了 VS Code 市场发布所需的令牌,以便把此前的更新顺利推送到插件商店。除了一条 CI 调整:发布资源上传现在是幂等的(提交 81ddb60859),重复执行不会产生副作用。对使用者来说,这次更新的实际影响就是能在 VS Code 市场上正常收到此前那次发布的版本。
2026-08-072026-08-07
本次更新带来三项主要改进。首先是完整支持 OTP 29 的原生 record(对应 EEP-79),升级到新版 OTP 后不再需要额外处理。其次是 Eqwalizer 的一批修复与增强:收紧了 map 类型的交集与重叠判断,修正 isfunction、ismap_key 等守卫条件下的类型收窄,guard 中「未定义 record 字段」的检查也已移除,减少误报;同时解决了临时 eqwalizer 文件恢复逻辑的 bug。此外,IDE 主循环的稳定性有所提升,可有效避免卡死。内部还做了命名表示与代码生成的优化,对使用者无感。
2026-06-102026-06-11
ELP 这次更新信息量不小,最需要留意的是 .elplint.toml 配置文件改了格式:enabledlints 与 disabled_lints 两个键已废弃,且文件现在会被校验,旧配置不清理就直接启动失败,改用新的 lint 启停配置格式即可;改完热更新在 IDE 里即时生效。
功能方面,新增 Erlang/OTP 29 支持(原生 record、多值推导等),宏处理重写后能正确解析 ?FUNCTIONNAME、?FUNCTIONARITY、??;条件编译已实现但默认关闭,需传 --if-def 或设置 elp.ifdef.enable 开启。CLI 增加守护进程模式 --connect,结构化搜索替换(SSR)与 eqWAlizer 类型检查器同步升级。
新增一批 lint 规则:W0073–W0075 抓 eqWAlizer 逃生舱,W0076 校验 -dialyzer() 属性,W0077 标出未使用的导出函数,W0078 查重复 include,W0080 提示可简化的 maps:merge/2。另外冗余的 elp:ignore、elp:fixme 也会被报出来。
体验上,lint 速度提升约 13%,查找引用覆盖 supervisor child spec,补全 include 按字母排序,未定义 record、未用 record 字段都有快速修复,还能把 case 抽取为函数子句、高亮 format string 说明符。
2026-02-272026-02-27
本版重点:EqWAlizer 新增对 map 生成器与列表推导中迭代器的支持;ELP 的作用域解析做了与 OTP 对齐的修正,lambda 头部绑定的取值规则也随之修好,IDE 里经 code lens 执行测试时不再把通过用例逐条刷出来。EqWAlizer 文档已挂上 ELP 官网,且文档缺失不再导致编译失败。
另一条主线是 ifdef 预处理器新特性:条件求值接入宏解析,配套新增 W0061/W0062 两项诊断,可通过 --new-ifdef 命令行开关和 LSP 配置项启用。诊断方面另有三项新增——W0071 redundantfunwrapper、W0072 encodehexwith_case,以及嵌套列表推导的行内提示。SSR 侧修复了 receive/after 与 try/catch 占位符漏匹配表达式的两个问题。Windows CI 改为禁用 jemalloc,网站依赖 ajv 升至 6.14.0,另有一批性能与稳定性修补。
2026-02-102026-02-10
elp 本次更新主要围绕解析能力与命令行参数的整理:新增对部分生成文件的支持,elp shell 现在可以接受初始命令直接执行,范围整数缺失的内置类型定义也补齐了。lint 侧新增 W0063 诊断,用于提示 zip 中严格与宽松生成器混用;W0037(unspecificinclude)改写为基于 trait 的 linter,并修正了 boundvariable 诊断的误报。
命令行方面,elp ssr 的 --include-tests 已移除,默认即包含测试;lint 的 --include-ct-diagnostics 标记为弃用。--in-place 等旧参数恢复并以警告方式提示。OTP 28 及以上版本禁用 setsversion2 检查。底层将 lsp-types 升级至 0.94.1,另有多处依赖安全修复、性能优化与若干 bug 修复。