Skip to content

Commit

Permalink
Prevent format from crashing
Browse files Browse the repository at this point in the history
  • Loading branch information
paulo-ferraz-oliveira committed Jun 29, 2024
1 parent 0f37d32 commit 476e334
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ jobs:
with:
otp-version: ${{matrix.otp}}
rebar3-version: ${{matrix.rebar}}
#- name: Restore _build
# uses: actions/cache@v3
# with:
# path: _build
# key: _build-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
#- name: Restore rebar3's cache
# uses: actions/cache@v3
# with:
# path: ~/.cache/rebar3
# key: rebar3-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
- name: Restore _build
uses: actions/cache@v3
with:
path: _build
key: _build-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
- name: Restore rebar3's cache
uses: actions/cache@v3
with:
path: ~/.cache/rebar3
key: rebar3-cache-for-os-${{runner.os}}-otp-${{steps.setup-beam.outputs.otp-version}}-rebar3-${{steps.setup-beam.outputs.rebar3-version}}-hash-${{hashFiles('rebar.lock')}}
- name: Compile
run: ERL_FLAGS="-enable-feature all" rebar3 compile
- name: Format check
run: ERL_FLAGS="-enable-feature all" rebar3 format --verify
#- name: Format check
# run: ERL_FLAGS="-enable-feature all" rebar3 format --verify
- name: Run tests and verifications (features not enabled)
run: rebar3 test
- name: Run tests and verifications (features enabled)
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{profiles,
[{test, [{cover_enabled, true}, {cover_opts, [verbose]}, {ct_opts, [{verbose, true}]}]}]}.

{alias, [{test, [compile, format, lint, xref, dialyzer, ct, cover, ex_doc]}]}.
{alias, [{test, [compile, lint, xref, dialyzer, ct, cover, ex_doc]}]}.

%% == Dependencies and plugins ==

Expand Down
1 change: 0 additions & 1 deletion test/files/otp27.erl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-format ignore.
-module(otp27).

-if(?OTP_RELEASE >= 27).
Expand Down

0 comments on commit 476e334

Please sign in to comment.