From d4d9771a71c0075410b93ea093d7670bb139710d Mon Sep 17 00:00:00 2001 From: Badlop Date: Mon, 26 Aug 2024 11:54:36 +0200 Subject: [PATCH] Makefile: Add support for "make elvis" when using rebar3 --- Makefile.in | 8 ++++++++ rebar.config | 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile.in b/Makefile.in index 5adf241d5..82073c367 100644 --- a/Makefile.in +++ b/Makefile.in @@ -642,6 +642,13 @@ dialyzer: erlang_plt deps_plt ejabberd_plt endif endif +#. +#' elvis +# + +elvis: + $(REBAR) lint + #. #' test # @@ -699,6 +706,7 @@ help: @echo " indent Indent source code using erlang-mode [emacs]" @echo "" @echo " dialyzer Run Dialyzer static analyzer" + @echo " elvis Run Elvis source code style reviewer [rebar3]" @echo " hooks Run hooks validator" @echo " test Run Common Tests suite [rebar3]" @echo " test-eunit Run EUnit suite [rebar3]" diff --git a/rebar.config b/rebar.config index 017546f02..5fcc1e5bb 100644 --- a/rebar.config +++ b/rebar.config @@ -156,7 +156,8 @@ {branch, "consolidation_fix"}}} }]}}. {if_rebar3, {project_plugins, [configure_deps, - {if_var_true, tools, rebar3_format} + {if_var_true, tools, rebar3_format}, + {if_var_true, tools, rebar3_lint} ]}}. {if_not_rebar3, {plugins, [ deps_erl_opts, override_deps_versions2, override_opts, configure_deps