Skip to content

Commit

Permalink
Merge pull request #314 from paulo-ferraz-oliveira/feature/a-new-katana
Browse files Browse the repository at this point in the history
Feature a new katana
  • Loading branch information
elbrujohalcon authored Jul 3, 2023
2 parents c0993ef + ccf2cd1 commit 5cc15a1
Show file tree
Hide file tree
Showing 10 changed files with 25 additions and 40 deletions.
10 changes: 1 addition & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
id: setup-beam
with:
otp-version: ${{matrix.otp_vsn}}
rebar3-version: '3'
rebar3-version: '3.20'
- name: Restore _build
uses: actions/cache@v3
with:
Expand All @@ -41,21 +41,13 @@ jobs:
-rebar3-${{steps.setup-beam.outputs.rebar3-version}}\
-hash-${{hashFiles('rebar.lock')}}"
- name: Compile
env:
ERL_FLAGS: "-enable-feature all"
run: rebar3 compile
- name: Format check
if: ${{ matrix.os == 'ubuntu-20.04' }}
env:
ERL_FLAGS: "-enable-feature all"
run: rebar3 format --verify
- name: Run test
env:
ERL_FLAGS: "-enable-feature all"
run: rebar3 test
- name: Run elvis on elvis
env:
ERL_FLAGS: "-enable-feature all"
run: |
rebar3 escriptize
_build/default/bin/elvis_core
11 changes: 5 additions & 6 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@ jobs:
with:
globs: |
LICENSE
CONTRIBUTING.md
MIGRATION.md
README.md
RULES.md
*.md
doc_rules/**/*.md
.github/ISSUE_TEMPLATE/*.md
.github/**/*.md
- name: yamllint
uses: ibiqlik/action-yamllint@v3
with:
file_or_dir: .github/workflows/*.yml
file_or_dir: |
.github/**/*.yml
.*.yml
strict: true
config_file: .yamllint.yml
1 change: 1 addition & 0 deletions .markdownlint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
default: true
MD013:
line_length: 100
1 change: 1 addition & 0 deletions .yamllint.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
extends: default
rules:
line-length:
Expand Down
5 changes: 3 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<!-- markdownlint-disable MD013 -->
# Changelog

For more recent releases check the [Releases](../../releases) page.

## [1.3.1](https://github.com/inaka/elvis_core/tree/1.3.1) (2021-10-18)

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



\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
20 changes: 2 additions & 18 deletions rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,7 @@
%% == Erlang Compiler ==

%% Erlang compiler options
{erl_opts,
[warn_unused_vars,
warn_export_all,
warn_shadow_vars,
warn_unused_import,
warn_unused_function,
warn_bif_clash,
warn_unused_record,
warn_deprecated_function,
warn_obsolete_guard,
strict_validation,
warn_export_vars,
warn_exported_vars,
warn_missing_spec,
warn_untyped_record,
debug_info,
{feature, maybe_expr, enable}]}.
{erl_opts, [debug_info, warn_export_vars, warn_missing_spec, warn_unused_import]}.

{profiles,
[{test,
Expand All @@ -39,7 +23,7 @@

%% == Dependencies ==

{deps, [{zipper, "1.0.1"}, {katana_code, "~> 2.0.1"}]}.
{deps, [{zipper, "1.0.1"}, {katana_code, "~> 2.0.2"}]}.

%% == Dialyzer ==

Expand Down
6 changes: 3 additions & 3 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{"1.2.0",
[{<<"katana_code">>,{pkg,<<"katana_code">>,<<"2.0.1">>},0},
[{<<"katana_code">>,{pkg,<<"katana_code">>,<<"2.0.2">>},0},
{<<"zipper">>,{pkg,<<"zipper">>,<<"1.0.1">>},0}]}.
[
{pkg_hash,[
{<<"katana_code">>, <<"E29D82DBCF410FD29665B3FD2C9D9C445F1E8FAC4B01488294ECAA84CCB8400C">>},
{<<"katana_code">>, <<"FAC8F2ABFB2ED54304EE44EEEEC30275BD026550533D094265A51927D7D9470D">>},
{<<"zipper">>, <<"3CCB4F14B97C06B2749B93D8B6C204A1ECB6FAFC6050CACC3B93B9870C05952A">>}]},
{pkg_hash_ext,[
{<<"katana_code">>, <<"D02F757C8DDE643614D508474A97FC24D9015FE375477E34DE26450BF21CAC16">>},
{<<"katana_code">>, <<"3E57FED635E0B16A5FBDACCDC872EC53DEB21ED9FC6E7EB9B6415FF199B7B138">>},
{<<"zipper">>, <<"6A1FD3E1F0CC1D1DF5642C9A0CE2178036411B0A5C9642851D1DA276BD737C2D">>}]}
].
3 changes: 2 additions & 1 deletion src/elvis_core.erl
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ rock_this(Path, Config) ->

%% @private
-spec do_parallel_rock(elvis_config:config()) ->
ok | {fail, [elvis_result:file() | elvis_result:rule()]}.
ok |
{fail, [{throw, term()} | elvis_result:file() | elvis_result:rule()]}.
do_parallel_rock(Config0) ->
Parallel = elvis_config:from_application_or_config(parallel, 1),
Config = elvis_config:resolve_files(Config0),
Expand Down
6 changes: 6 additions & 0 deletions test/examples/fail_used_ignored_variable.erl
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
-module(fail_used_ignored_variable).

-if(?OTP_RELEASE >= 25).

-feature(maybe_expr, enable).

-endif.

-export([ use_ignored_var/2
, use_ignored_var_in_fun/2
, no_used_ignored_vars_here/2, handle_call/3
Expand Down
2 changes: 1 addition & 1 deletion test/style_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ verify_used_ignored_variable(Config) ->
[#{line_num := _}, #{line_num := _}, #{line_num := _}, #{line_num := _}] =
elvis_core_apply_rule(Config, elvis_style, used_ignored_variable, #{}, Path);
erl_files ->
[#{line_num := 25}, #{line_num := 28}, #{line_num := 32}, #{line_num := 32}] =
[#{line_num := 31}, #{line_num := 34}, #{line_num := 38}, #{line_num := 38}] =
elvis_core_apply_rule(Config, elvis_style, used_ignored_variable, #{}, Path)
end,
[] =
Expand Down

0 comments on commit 5cc15a1

Please sign in to comment.