diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1715409..35d347e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,14 +9,17 @@ on: jobs: build: strategy: + fail-fast: false matrix: + os: [ubuntu-22.04, macos-latest] + otp-version: [27, 28, 29] include: - - os: ubuntu-22.04 - otp-version: 27 - rebar3-version: 3.24.0 - - os: macos-latest - otp-version: 27 + - otp-version: 27 rebar3-version: 3.24.0 + - otp-version: 28 + rebar3-version: 3.27.0 + - otp-version: 29 + rebar3-version: 3.27.0 runs-on: ${{ matrix.os }} steps: - name: Checkout @@ -44,8 +47,8 @@ jobs: uses: actions/cache@v4 with: path: ~/.cache/rebar3/rebar3_*.plt - key: ${{ runner.os }}-dialyzer-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }} + key: ${{ runner.os }}-otp-${{ matrix.otp-version }}-dialyzer-${{ hashFiles(format('{0}{1}', github.workspace, '/rebar.config')) }} restore-keys: | - ${{ runner.os }}-dialyzer- + ${{ runner.os }}-otp-${{ matrix.otp-version }}-dialyzer- - name: Dialyzer run: rebar3 dialyzer diff --git a/src/wa_assert_parse_trans.erl b/src/wa_assert_parse_trans.erl index e8ef5ba..be47673 100644 --- a/src/wa_assert_parse_trans.erl +++ b/src/wa_assert_parse_trans.erl @@ -154,13 +154,9 @@ process_expand_assert([Expr]) -> -spec get_line(tree()) -> non_neg_integer(). get_line(Expr) -> Anno = erl_syntax:get_pos(Expr), - case Anno of - N when is_integer(N) -> N; - _ -> - case erl_anno:is_anno(Anno) of - true -> erl_anno:line(Anno); - false -> 0 - end + case erl_anno:is_anno(Anno) of + true -> erl_anno:line(Anno); + false -> 0 end. -spec expand_comparison(tree(), tree(), [tree()], non_neg_integer()) -> tree().