Skip to content

Commit 5cc15a1

Browse files
Merge pull request #314 from paulo-ferraz-oliveira/feature/a-new-katana
Feature a new katana
2 parents c0993ef + ccf2cd1 commit 5cc15a1

10 files changed

+25
-40
lines changed

.github/workflows/ci.yml

+1-9
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
id: setup-beam
2222
with:
2323
otp-version: ${{matrix.otp_vsn}}
24-
rebar3-version: '3'
24+
rebar3-version: '3.20'
2525
- name: Restore _build
2626
uses: actions/cache@v3
2727
with:
@@ -41,21 +41,13 @@ jobs:
4141
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
4242
-hash-${{hashFiles('rebar.lock')}}"
4343
- name: Compile
44-
env:
45-
ERL_FLAGS: "-enable-feature all"
4644
run: rebar3 compile
4745
- name: Format check
4846
if: ${{ matrix.os == 'ubuntu-20.04' }}
49-
env:
50-
ERL_FLAGS: "-enable-feature all"
5147
run: rebar3 format --verify
5248
- name: Run test
53-
env:
54-
ERL_FLAGS: "-enable-feature all"
5549
run: rebar3 test
5650
- name: Run elvis on elvis
57-
env:
58-
ERL_FLAGS: "-enable-feature all"
5951
run: |
6052
rebar3 escriptize
6153
_build/default/bin/elvis_core

.github/workflows/lint.yml

+5-6
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@ jobs:
1616
with:
1717
globs: |
1818
LICENSE
19-
CONTRIBUTING.md
20-
MIGRATION.md
21-
README.md
22-
RULES.md
19+
*.md
2320
doc_rules/**/*.md
24-
.github/ISSUE_TEMPLATE/*.md
21+
.github/**/*.md
2522
2623
- name: yamllint
2724
uses: ibiqlik/action-yamllint@v3
2825
with:
29-
file_or_dir: .github/workflows/*.yml
26+
file_or_dir: |
27+
.github/**/*.yml
28+
.*.yml
3029
strict: true
3130
config_file: .yamllint.yml

.markdownlint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
default: true
23
MD013:
34
line_length: 100

.yamllint.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
---
12
extends: default
23
rules:
34
line-length:

CHANGELOG.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
<!-- markdownlint-disable MD013 -->
12
# Changelog
23

4+
For more recent releases check the [Releases](../../releases) page.
5+
36
## [1.3.1](https://github.com/inaka/elvis_core/tree/1.3.1) (2021-10-18)
47

58
[Full Changelog](https://github.com/inaka/elvis_core/compare/1.3.0...1.3.1)
@@ -436,6 +439,4 @@
436439
- Copy in the elvis files [\#2](https://github.com/inaka/elvis_core/pull/2) ([Licenser](https://github.com/Licenser))
437440
- Update LICENSE [\#1](https://github.com/inaka/elvis_core/pull/1) ([elbrujohalcon](https://github.com/elbrujohalcon))
438441

439-
440-
441442
\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*

rebar.config

+2-18
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,7 @@
44
%% == Erlang Compiler ==
55

66
%% Erlang compiler options
7-
{erl_opts,
8-
[warn_unused_vars,
9-
warn_export_all,
10-
warn_shadow_vars,
11-
warn_unused_import,
12-
warn_unused_function,
13-
warn_bif_clash,
14-
warn_unused_record,
15-
warn_deprecated_function,
16-
warn_obsolete_guard,
17-
strict_validation,
18-
warn_export_vars,
19-
warn_exported_vars,
20-
warn_missing_spec,
21-
warn_untyped_record,
22-
debug_info,
23-
{feature, maybe_expr, enable}]}.
7+
{erl_opts, [debug_info, warn_export_vars, warn_missing_spec, warn_unused_import]}.
248

259
{profiles,
2610
[{test,
@@ -39,7 +23,7 @@
3923

4024
%% == Dependencies ==
4125

42-
{deps, [{zipper, "1.0.1"}, {katana_code, "~> 2.0.1"}]}.
26+
{deps, [{zipper, "1.0.1"}, {katana_code, "~> 2.0.2"}]}.
4327

4428
%% == Dialyzer ==
4529

rebar.lock

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{"1.2.0",
2-
[{<<"katana_code">>,{pkg,<<"katana_code">>,<<"2.0.1">>},0},
2+
[{<<"katana_code">>,{pkg,<<"katana_code">>,<<"2.0.2">>},0},
33
{<<"zipper">>,{pkg,<<"zipper">>,<<"1.0.1">>},0}]}.
44
[
55
{pkg_hash,[
6-
{<<"katana_code">>, <<"E29D82DBCF410FD29665B3FD2C9D9C445F1E8FAC4B01488294ECAA84CCB8400C">>},
6+
{<<"katana_code">>, <<"FAC8F2ABFB2ED54304EE44EEEEC30275BD026550533D094265A51927D7D9470D">>},
77
{<<"zipper">>, <<"3CCB4F14B97C06B2749B93D8B6C204A1ECB6FAFC6050CACC3B93B9870C05952A">>}]},
88
{pkg_hash_ext,[
9-
{<<"katana_code">>, <<"D02F757C8DDE643614D508474A97FC24D9015FE375477E34DE26450BF21CAC16">>},
9+
{<<"katana_code">>, <<"3E57FED635E0B16A5FBDACCDC872EC53DEB21ED9FC6E7EB9B6415FF199B7B138">>},
1010
{<<"zipper">>, <<"6A1FD3E1F0CC1D1DF5642C9A0CE2178036411B0A5C9642851D1DA276BD737C2D">>}]}
1111
].

src/elvis_core.erl

+2-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,8 @@ rock_this(Path, Config) ->
8383

8484
%% @private
8585
-spec do_parallel_rock(elvis_config:config()) ->
86-
ok | {fail, [elvis_result:file() | elvis_result:rule()]}.
86+
ok |
87+
{fail, [{throw, term()} | elvis_result:file() | elvis_result:rule()]}.
8788
do_parallel_rock(Config0) ->
8889
Parallel = elvis_config:from_application_or_config(parallel, 1),
8990
Config = elvis_config:resolve_files(Config0),

test/examples/fail_used_ignored_variable.erl

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
-module(fail_used_ignored_variable).
22

3+
-if(?OTP_RELEASE >= 25).
4+
5+
-feature(maybe_expr, enable).
6+
7+
-endif.
8+
39
-export([ use_ignored_var/2
410
, use_ignored_var_in_fun/2
511
, no_used_ignored_vars_here/2, handle_call/3

test/style_SUITE.erl

+1-1
Original file line numberDiff line numberDiff line change
@@ -629,7 +629,7 @@ verify_used_ignored_variable(Config) ->
629629
[#{line_num := _}, #{line_num := _}, #{line_num := _}, #{line_num := _}] =
630630
elvis_core_apply_rule(Config, elvis_style, used_ignored_variable, #{}, Path);
631631
erl_files ->
632-
[#{line_num := 25}, #{line_num := 28}, #{line_num := 32}, #{line_num := 32}] =
632+
[#{line_num := 31}, #{line_num := 34}, #{line_num := 38}, #{line_num := 38}] =
633633
elvis_core_apply_rule(Config, elvis_style, used_ignored_variable, #{}, Path)
634634
end,
635635
[] =

0 commit comments

Comments
 (0)