Skip to content

Commit

Permalink
rebar3: Makefile make dialyze and make introspect
Browse files Browse the repository at this point in the history
  • Loading branch information
jiahuili430 committed Jul 20, 2022
1 parent 7d59947 commit 53c4e6e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 19 deletions.
22 changes: 3 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,6 @@ skip_deps=folsom,meck,mochiweb,triq,proper,snappy,bcrypt,hyper,ibrowse
suites=
tests=

DIALYZE_OPTS=$(shell echo "\
apps=$(apps) \
skip_deps=$(skip_deps) \
" | sed -e 's/[a-z]\{1,\}= / /g')
EXUNIT_OPTS=$(subst $(comma),$(space),$(tests))

TEST_OPTS="-c 'startup_jitter=0' -c 'default_security=admin_local'"
Expand Down Expand Up @@ -330,28 +326,16 @@ weatherreport-test: devclean escriptize
################################################################################


.PHONY: build-plt
# target: build-plt - Build project-specific PLT
build-plt:
@$(REBAR) -r build-plt $(DIALYZE_OPTS)


.PHONY: check-plt
# target: check-plt - Check the PLT for consistency and rebuild it if it is not up-to-date
check-plt:
@$(REBAR) -r check-plt $(DIALYZE_OPTS)


.PHONY: dialyze
# target: dialyze - Analyze the code for discrepancies
dialyze: .rebar
@$(REBAR) -r dialyze $(DIALYZE_OPTS)
dialyze:
@$(REBAR3) dialyzer


.PHONY: introspect
# target: introspect - Check for commits difference between rebar.config and repository
introspect:
@$(REBAR) -r update-deps
@$(REBAR3) upgrade --all
@build-aux/introspect

################################################################################
Expand Down
1 change: 1 addition & 0 deletions rebar.config.script
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ os:putenv("COUCHDB_APPS_CONFIG_DIR", filename:join([COUCHDB_ROOT, "rel/apps"])).
AddConfig = [
{require_otp_vsn, "23|24|25"},
{erl_opts, [{i, "../"}, {d, 'COUCHDB_ERLANG_VERSION', VerString}]},
{deps, []},
{plugins, [ic, erlfmt]},
{erlfmt, [write]},
{eunit_opts, [
Expand Down

0 comments on commit 53c4e6e

Please sign in to comment.