Skip to content

Commit

Permalink
Merge pull request #572 from inaka/elbrujohalcon.571.update-deps
Browse files Browse the repository at this point in the history
Fix #571: Upgrade deps
  • Loading branch information
elbrujohalcon committed Aug 3, 2023
2 parents a482801 + 11c17df commit e07bd78
Show file tree
Hide file tree
Showing 11 changed files with 34 additions and 39 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ jobs:
runs-on: ${{matrix.os}}
strategy:
matrix:
otp_vsn: ["21", "22", "23"]
os: [ubuntu-latest]
otp_vsn: [23, 24, 25]
os: [ubuntu-20.04]
steps:
- name: Install Git 2.18
shell: bash
Expand All @@ -28,13 +28,12 @@ jobs:
sudo make prefix=/usr/local all
sudo make prefix=/usr/local install
cd $HOME
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: erlef/setup-beam@v1.7.0
- uses: actions/checkout@v3
- uses: erlef/setup-beam@v1
id: setup-beam
with:
otp-version: ${{matrix.otp_vsn}}
rebar3-version: '3.14'
rebar3-version: '3.20'
- shell: bash
run: rebar3 dialyzer
- shell: bash
Expand Down
4 changes: 0 additions & 4 deletions elvis.config
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@
filter => "*.erl",
ruleset => erl_files
},
#{dirs => ["."],
filter => "Makefile",
ruleset => makefiles
},
#{dirs => ["."],
filter => "rebar.config",
ruleset => rebar_config
Expand Down
2 changes: 1 addition & 1 deletion rebar.config
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

%% == Dependencies ==

{deps, [ {elvis_core, "1.3.1"}
{deps, [ {elvis_core, "3.0.1"}
, {getopt, "1.0.2"}
, {egithub, "0.7.0"}
]}.
Expand Down
24 changes: 12 additions & 12 deletions rebar.lock
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
{"1.2.0",
[{<<"certifi">>,{pkg,<<"certifi">>,<<"2.8.0">>},2},
[{<<"certifi">>,{pkg,<<"certifi">>,<<"2.11.0">>},2},
{<<"egithub">>,{pkg,<<"egithub">>,<<"0.7.0">>},0},
{<<"elvis_core">>,{pkg,<<"elvis_core">>,<<"1.3.1">>},0},
{<<"elvis_core">>,{pkg,<<"elvis_core">>,<<"3.0.1">>},0},
{<<"getopt">>,{pkg,<<"getopt">>,<<"1.0.2">>},0},
{<<"goldrush">>,{pkg,<<"goldrush">>,<<"0.1.9">>},1},
{<<"hackney">>,{pkg,<<"hackney">>,<<"1.17.1">>},1},
{<<"idna">>,{pkg,<<"idna">>,<<"6.1.1">>},2},
{<<"jsx">>,{pkg,<<"jsx">>,<<"2.10.0">>},1},
{<<"katana_code">>,{pkg,<<"katana_code">>,<<"1.1.2">>},1},
{<<"katana_code">>,{pkg,<<"katana_code">>,<<"2.0.2">>},1},
{<<"lager">>,{pkg,<<"lager">>,<<"3.9.1">>},1},
{<<"metrics">>,{pkg,<<"metrics">>,<<"1.0.1">>},2},
{<<"mimerl">>,{pkg,<<"mimerl">>,<<"1.2.0">>},2},
{<<"parse_trans">>,{pkg,<<"parse_trans">>,<<"3.4.1">>},2},
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.6">>},2},
{<<"ssl_verify_fun">>,{pkg,<<"ssl_verify_fun">>,<<"1.1.7">>},2},
{<<"unicode_util_compat">>,{pkg,<<"unicode_util_compat">>,<<"0.7.0">>},2},
{<<"zipper">>,{pkg,<<"zipper">>,<<"1.0.1">>},1}]}.
[
{pkg_hash,[
{<<"certifi">>, <<"D4FB0A6BB20B7C9C3643E22507E42F356AC090A1DCEA9AB99E27E0376D695EBA">>},
{<<"certifi">>, <<"5ADFE37CEB8569D019F836944AEAF27F8AC391DACAF3707F570C155B7E03AAA8">>},
{<<"egithub">>, <<"CFF720B2ADE8A0528B8861D2309339FD3C1C289B9BCB9E498FF77C619CE28AF2">>},
{<<"elvis_core">>, <<"844C339300DD3E9F929A045932D25DC5C99B4603D47536E995198143169CDF26">>},
{<<"elvis_core">>, <<"EA8EB07EAA0236A682FC58F82C1138A65D35F5947294FA6D825402E0F33EA4B2">>},
{<<"getopt">>, <<"33D9B44289FE7AD08627DDFE1D798E30B2DA0033B51DA1B3A2D64E72CD581D02">>},
{<<"goldrush">>, <<"F06E5D5F1277DA5C413E84D5A2924174182FB108DABB39D5EC548B27424CD106">>},
{<<"hackney">>, <<"08463F93D2CC1A03817BF28D8DAE6021543F773BD436C9377047224856C4422C">>},
{<<"idna">>, <<"8A63070E9F7D0C62EB9D9FCB360A7DE382448200FBBD1B106CC96D3D8099DF8D">>},
{<<"jsx">>, <<"77760560D6AC2B8C51FD4C980E9E19B784016AA70BE354CE746472C33BEB0B1C">>},
{<<"katana_code">>, <<"4336743263236C3213FF1B979ECAE263940B9084ACE90E9434838F3F98CCA578">>},
{<<"katana_code">>, <<"FAC8F2ABFB2ED54304EE44EEEEC30275BD026550533D094265A51927D7D9470D">>},
{<<"lager">>, <<"5885BC71308CD38F9D025C8ECDE4E5CCE1CE8565F80BFC6199865C845D6DBE95">>},
{<<"metrics">>, <<"25F094DEA2CDA98213CECC3AEFF09E940299D950904393B2A29D191C346A8486">>},
{<<"mimerl">>, <<"67E2D3F571088D5CFD3E550C383094B47159F3EEE8FFA08E64106CDF5E981BE3">>},
{<<"parse_trans">>, <<"6E6AA8167CB44CC8F39441D05193BE6E6F4E7C2946CB2759F015F8C56B76E5FF">>},
{<<"ssl_verify_fun">>, <<"CF344F5692C82D2CD7554F5EC8FD961548D4FD09E7D22F5B62482E5AEAEBD4B0">>},
{<<"ssl_verify_fun">>, <<"354C321CF377240C7B8716899E182CE4890C5938111A1296ADD3EC74CF1715DF">>},
{<<"unicode_util_compat">>, <<"BC84380C9AB48177092F43AC89E4DFA2C6D62B40B8BD132B1059ECC7232F9A78">>},
{<<"zipper">>, <<"3CCB4F14B97C06B2749B93D8B6C204A1ECB6FAFC6050CACC3B93B9870C05952A">>}]},
{pkg_hash_ext,[
{<<"certifi">>, <<"6AC7EFC1C6F8600B08D625292D4BBF584E14847CE1B6B5C44D983D273E1097EA">>},
{<<"certifi">>, <<"9E37E0542EC3FABAA19A0734B3900DC095797FAC48C40A2A9741D8AD5E3C9BB7">>},
{<<"egithub">>, <<"E009CE11EFD8008D0F9ED59D9C488E3E9ABE302A0F2CD6D663E4CC26756FCC4C">>},
{<<"elvis_core">>, <<"7A8890BF8185A3252CD4EBD826FE5F8AD6B93024EDF88576EB27AE9E5DC19D69">>},
{<<"elvis_core">>, <<"4CF735401E7465C10851C6245C1E3E8E764984D8C0B5949D5697B14B5FAEAD49">>},
{<<"getopt">>, <<"A0029AEA4322FB82A61F6876A6D9C66DC9878B6CB61FAA13DF3187384FD4EA26">>},
{<<"goldrush">>, <<"99CB4128CFFCB3227581E5D4D803D5413FA643F4EB96523F77D9E6937D994CEB">>},
{<<"hackney">>, <<"D2CBA9E3C8103AD0320623E9F1C33E8D378A15EAABE2EE8AE441898F3D35A18C">>},
{<<"idna">>, <<"92376EB7894412ED19AC475E4A86F7B413C1B9FBB5BD16DCCD57934157944CEA">>},
{<<"jsx">>, <<"9A83E3704807298016968DB506F9FAD0F027DE37546EB838B3AE1064C3A0AD62">>},
{<<"katana_code">>, <<"E7E6162A44E826A03F68B503B7D92981B894BF834C1EF0E647783F7D6688021C">>},
{<<"katana_code">>, <<"3E57FED635E0B16A5FBDACCDC872EC53DEB21ED9FC6E7EB9B6415FF199B7B138">>},
{<<"lager">>, <<"3F59BA75A04A99E5F18BF91C89F46DCE536F83C6CB415FE26E6E75A62BEF37DC">>},
{<<"metrics">>, <<"69B09ADDDC4F74A40716AE54D140F93BEB0FB8978D8636EADED0C31B6F099F16">>},
{<<"mimerl">>, <<"F278585650AA581986264638EBF698F8BB19DF297F66AD91B18910DFC6E19323">>},
{<<"parse_trans">>, <<"620A406CE75DADA827B82E453C19CF06776BE266F5A67CFF34E1EF2CBB60E49A">>},
{<<"ssl_verify_fun">>, <<"BDB0D2471F453C88FF3908E7686F86F9BE327D065CC1EC16FA4540197EA04680">>},
{<<"ssl_verify_fun">>, <<"FE4C190E8F37401D30167C8C405EDA19469F34577987C76DDE613E838BBC67F8">>},
{<<"unicode_util_compat">>, <<"25EEE6D67DF61960CF6A794239566599B09E17E668D3700247BC498638152521">>},
{<<"zipper">>, <<"6A1FD3E1F0CC1D1DF5642C9A0CE2178036411B0A5C9642851D1DA276BD737C2D">>}]}
].
4 changes: 2 additions & 2 deletions src/elvis.erl
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ process_options([{parallel, Num} | Opts], Cmds, Config) ->
process_options([], Cmds, Config) ->
process_commands(Cmds, Config).

-spec process_commands([string()], elvis_config:configs()) ->ok.
-spec process_commands([string()], elvis_config:configs()) -> ok.
process_commands([rock | Files], Config) ->
case Files of
[] ->
Expand All @@ -168,7 +168,7 @@ process_commands(['git-branch', Commit | Cmds], Config) ->
process_commands([], _Config) ->
ok;
process_commands([_Cmd | _Cmds], _Config) ->
throw(unrecognized_or_unimplemented_command).
error(unrecognized_or_unimplemented_command).

%%% Options

Expand Down
6 changes: 3 additions & 3 deletions src/elvis_git.erl
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ install_hook() ->
check_git_dir() ->
case filelib:is_dir(".git") of
true -> ok;
false -> throw("Not a git repository.")
false -> error("Not a git repository.")
end.

%% @doc Adds elvis as a pre commit hook. If a pre-commit file already exists
Expand All @@ -123,7 +123,7 @@ add_pre_commit_hook() ->
{ok, Content} = file:read_file(?PRE_COMMIT_FILE),
case binary:match(Content, <<"elvis">>) of
nomatch -> {[append], Command};
_ -> throw("Elvis is already installed as a git hook.")
_ -> error("Elvis is already installed as a git hook.")
end;
false -> {[write], <<Header/binary, Command/binary>>}
end,
Expand Down Expand Up @@ -155,7 +155,7 @@ patch_line_type(Line) ->
$+ -> addition;
$- -> deletion;
$\\ -> same;
$ -> same %space
$\s -> same %space
end.

%% @private
Expand Down
6 changes: 2 additions & 4 deletions src/elvis_webhook.erl
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ handle_pull_request(Cred, Data, GithubFiles) ->
comments => []}}
end.

-spec handle_error( {error, term()}
, egithub_webhook:req_data()
, [egithub_webhook:file()]
) -> {ok, [], []}.
-spec handle_error(
{error, term()}, egithub_webhook:req_data(), [egithub_webhook:file()]) -> {ok, [], []}.
handle_error({error, _}, _, _) -> {ok, [], []}.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Expand Down
5 changes: 3 additions & 2 deletions test/elvis_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
end_per_suite
]).

-type config() :: [{atom(), term()}].
-type config() :: proplists:proplist().
-export_type([config/0]).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Common test
Expand Down Expand Up @@ -240,7 +241,7 @@ main_default_config(_Config) ->
meck:expect(elvis_utils, erlang_halt, fun(Code) -> Code end),
Src = "../../config/elvis-test.config",
Dest = "./elvis.config",
{ok , _} = file:copy(Src, Dest),
{ok, _} = file:copy(Src, Dest),

Expected = "# ../../src/elvis.erl.*OK",
RockFun = fun() -> elvis:main("rock") end,
Expand Down
4 changes: 2 additions & 2 deletions test/elvis_meta_SUITE.erl
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
-module(elvis_meta_SUITE).
-author('felipe@inakanetworks.net').

-export([all/0]).
-export([dialyzer/1, xref/1, elvis/1]).

-type config() :: [{atom(), term()}].
-type config() :: proplists:proplist().
-export_type([config/0]).

-spec all() -> [dialyzer | xref | elvis].
all() -> [dialyzer, xref, elvis].
Expand Down
4 changes: 2 additions & 2 deletions test/git_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
end_per_suite
]).

-type config() :: [{atom(), term()}].
-type config() :: proplists:proplist().
-export_type([config/0]).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Common test
Expand Down Expand Up @@ -129,4 +130,3 @@ maybe_git_config_user() ->
_ = os:cmd("git config user.name 'Your Name'"),
ok
end.

1 change: 1 addition & 0 deletions test/xref_SUITE.erl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
-module(xref_SUITE).

-type config() :: proplists:proplist().
-export_type([config/0]).

-export(
[
Expand Down

0 comments on commit e07bd78

Please sign in to comment.