Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 34 additions & 1 deletion .elp_lint.toml
Original file line number Diff line number Diff line change
@@ -1 +1,34 @@
disabled_lints = ['W0012', 'W0046', 'W0051', 'W0066']
[linters.W0012]
enabled = false

[linters.W0046]
enabled = false

[linters.W0051]
enabled = false

[linters.W0066]
enabled = false

# The ELP release from 2026-08-10 started always linting test files
# (previously test files were skipped). These lints are noisy on test
# fixtures/helpers (over-specified records, intentional nowarn_*,
# EDoc-style comments in older test helpers, includes kept for type
# reference) so keep them scoped to non-test code as before.
[linters.W0003]
include_tests = false

[linters.W0020]
include_tests = false

[linters.W0038]
include_tests = false

[linters.W0054]
include_tests = false

[linters.W0030]
include_tests = false

[linters.W0056]
include_tests = false
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ jobs:
strategy:
matrix:
otp: ["29", "28", "27"]
rebar3: ["3.25"]
rebar3: ["3.27"]
include:
# ELP (used by the lint and type_check steps) ships per-OTP builds.
# There is no OTP 29 build yet, so those steps are skipped on OTP 29.
- otp: "29"
elp_build: "https://github.com/WhatsApp/erlang-language-platform/releases/download/2026-08-10/elp-linux-x86_64-unknown-linux-gnu-otp-29.tar.gz"
- otp: "28"
elp_build: "https://github.com/WhatsApp/erlang-language-platform/releases/download/2026-02-27/elp-linux-x86_64-unknown-linux-gnu-otp-28.tar.gz"
elp_build: "https://github.com/WhatsApp/erlang-language-platform/releases/download/2026-08-10/elp-linux-x86_64-unknown-linux-gnu-otp-28.5.tar.gz"
- otp: "27"
elp_build: "https://github.com/WhatsApp/erlang-language-platform/releases/download/2026-02-27/elp-linux-x86_64-unknown-linux-gnu-otp-27.3.tar.gz"
elp_build: "https://github.com/WhatsApp/erlang-language-platform/releases/download/2026-08-10/elp-linux-x86_64-unknown-linux-gnu-otp-27.3.tar.gz"

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
elixir 1.18.4
erlang 28.2
erlang 28.5.0.6
rebar 3.27.0
6 changes: 3 additions & 3 deletions src/spectra_json.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1096,9 +1096,9 @@ field_default_value(#sp_rec_field{default = undefined}) -> undefined.
struct_default_value(undefined, _FieldName) ->
error;
struct_default_value(Defaults, FieldName) ->
case maps:find(FieldName, Defaults) of
{ok, V} when V =/= nil, V =/= undefined -> {ok, V};
_ -> error
case Defaults of
#{FieldName := V} when V =/= nil, V =/= undefined -> {ok, V};
#{} -> error
end.

-spec append_error_location([spectra:error()], atom() | integer()) -> [spectra:error()].
Expand Down
1 change: 1 addition & 0 deletions test/spectra_test_module_transform.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
% elp:ignore L0002 - ELP cannot run the spectra_transform parse_transform
-module(spectra_test_module_transform).

-compile({parse_transform, spectra_transform}).
Expand Down
1 change: 1 addition & 0 deletions test/spectra_test_module_transform_export_only.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
% elp:ignore L0002 - ELP cannot run the spectra_transform parse_transform
-module(spectra_test_module_transform_export_only).

-compile({parse_transform, spectra_transform}).
Expand Down
1 change: 1 addition & 0 deletions test/spectra_test_module_transform_function_only.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
% elp:ignore L0002 - ELP cannot run the spectra_transform parse_transform
-module(spectra_test_module_transform_function_only).

-compile({parse_transform, spectra_transform}).
Expand Down
1 change: 1 addition & 0 deletions test/spectra_test_module_transform_preserves.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
% elp:ignore L0002 - ELP cannot run the spectra_transform parse_transform
-module(spectra_test_module_transform_preserves).

-compile({parse_transform, spectra_transform}).
Expand Down
1 change: 1 addition & 0 deletions test/spectra_test_module_transform_spec_doc.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
% elp:ignore L0002 - ELP cannot run the spectra_transform parse_transform
-module(spectra_test_module_transform_spec_doc).

-compile({parse_transform, spectra_transform}).
Expand Down
1 change: 1 addition & 0 deletions test/spectra_test_module_transform_spec_only.erl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
% elp:ignore L0002 - ELP cannot run the spectra_transform parse_transform
-module(spectra_test_module_transform_spec_only).

-compile({parse_transform, spectra_transform}).
Expand Down
Loading