From 1481cd5e93706c517d41ef2f3db9e8a8c61fbc2f Mon Sep 17 00:00:00 2001 From: "Paulo F. Oliveira" Date: Thu, 20 May 2021 18:44:41 +0100 Subject: [PATCH] Up the CI game (#21) * Up the CI game * bump rebar3_lint * introduce rebar3_hank * Prevent a dialyzer warning on a consumer lib which happens to be rebar3_hex --- rebar.config | 2 +- src/verl_parser.erl | 4 ++-- test/verl_SUITE.erl | 1 + test/verl_parser_SUITE.erl | 1 + 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/rebar.config b/rebar.config index b31b6b6..50e7a11 100644 --- a/rebar.config +++ b/rebar.config @@ -5,7 +5,7 @@ ]}. {minimum_otp_vsn, "19.3"}. {deps, []}. -{project_plugins, [erlfmt, rebar3_proper, rebar3_hex, covertool, {rebar3_lint, "0.3.2"}]}. +{project_plugins, [erlfmt, rebar3_proper, rebar3_hex, covertool, rebar3_lint, rebar3_hank]}. {profiles, [ {test, [ {deps, [{proper, "1.3.0"}]}, diff --git a/src/verl_parser.erl b/src/verl_parser.erl index b0900cb..614b5a1 100644 --- a/src/verl_parser.erl +++ b/src/verl_parser.erl @@ -5,12 +5,12 @@ -type operator() :: '!=' | '&&' | '<' | '<=' | '==' | '>' | '>=' | '||' | '~>' | bitstring(). -spec parse_version(verl:version()) -> - {ok, {verl:major(), verl:minor(), verl:patch(), [verl:pre()], [verl:build()]}} + {ok, {verl:major(), verl:minor(), verl:patch(), verl:pre(), [verl:build()]}} | {error, invalid_version}. parse_version(Str) -> parse_version(Str, false). -spec parse_version(verl:version(), boolean()) -> - {ok, {verl:major(), verl:minor(), verl:patch(), [verl:pre()], [verl:build()]}} + {ok, {verl:major(), verl:minor(), verl:patch(), verl:pre(), [verl:build()]}} | {error, invalid_version}. parse_version(Str, Approximate) when is_binary(Str) -> try parse_and_convert(Str, Approximate) of diff --git a/test/verl_SUITE.erl b/test/verl_SUITE.erl index ccaa4a9..9009606 100644 --- a/test/verl_SUITE.erl +++ b/test/verl_SUITE.erl @@ -1,6 +1,7 @@ -module(verl_SUITE). -compile(export_all). +-hank([{unnecessary_function_arguments, all}]). -include_lib("common_test/include/ct.hrl"). -include_lib("stdlib/include/assert.hrl"). diff --git a/test/verl_parser_SUITE.erl b/test/verl_parser_SUITE.erl index 3082b48..dd86150 100644 --- a/test/verl_parser_SUITE.erl +++ b/test/verl_parser_SUITE.erl @@ -1,6 +1,7 @@ -module(verl_parser_SUITE). -compile(export_all). +-hank([{unnecessary_function_arguments, all}]). -include_lib("common_test/include/ct.hrl").