Skip to content

Commit

Permalink
Dialyzer
Browse files Browse the repository at this point in the history
  • Loading branch information
Håkan Mattsson committed Aug 23, 2023
1 parent fe6e16f commit 3c1bb1b
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 15 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ core*
/tutorial/README.md


# Dialyzer
.dialyzer_plt
dialyzer.log

# Lux
lux_logs
tmp_logs
Expand Down
37 changes: 24 additions & 13 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ DIALYZER_LOG = dialyzer.log

LUXCFG=$(DESTDIR)$(TARGETDIR)/priv/luxcfg

.PHONY: all debug clean xref doc test test_clean config_clean install
### BUILD ###

.PHONY: all debug clean config_clean doc

all debug clean:
@for d in $(SUBDIRS); do \
if test ! -d $$d ; then \
Expand All @@ -25,33 +28,41 @@ all debug clean:
fi ; \
done

xref:
bin/lux --xref
config_clean:
$(MAKE) clean
-rm -rf configure include.mk autom4te.cache config.status config.log *~

doc:
cd doc && $(MAKE) all

### TEST ###

.PHONY: test test_clean xref dialyzer dialyzer_clean

test:
cd test && $(MAKE) all

test_clean:
cd test && $(MAKE) clean

xref:
bin/lux --xref

dialyzer: $(DIALYZER_PLT)
dialyzer --src src --src bin --plt $(DIALYZER_PLT) \
-Wunderspecs -Woverspecs \
| tee $(DIALYZER_LOG)

$(DIALYZER_PLT):
dialyzer --build_plt --output_plt $(DIALYZER_PLT) \
--apps erts kernel stdlib runtime_tools xmerl inets
--apps erts kernel stdlib runtime_tools xmerl inets \
tools reltool et wx

dialyzer_clean:
rm -f $(DIALYZER_PLT) $(DIALYZER_LOG)

test:
cd test && $(MAKE) all
### INSTALL ###

test_clean:
cd test && $(MAKE) clean

config_clean:
$(MAKE) clean
-rm -rf configure include.mk autom4te.cache config.status config.log *~
.PHONY: install info

install:
@### TOP
Expand Down
2 changes: 2 additions & 0 deletions c_src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ endif

PROG = ../priv/bin/runpty

.PHONY: all debug trace clean info

all: $(PROG)

debug:
Expand Down
2 changes: 2 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ SRC_MD=$(wildcard $(WILDCARD))
GEN_MD=$(patsubst %.md.src,%.md,$(SRC_MD))
DEPS_MD=$(patsubst %.src,%.d,$(SRC_MD))

.PHONY: all doc clean

all doc: $(LUX_HTML)

clean:
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ APP_DIR=$(shell dirname $(PWD))
ERL_FILES=$(shell ls *erl)
EBIN_FILES=$(ERL_FILES:%.erl=../ebin/%.$(EMULATOR)) ../ebin/lux.app

.PHONY: all debug clean info

all debug: $(EBIN_FILES)

$(EBIN_FILES): lux.hrl
Expand Down
4 changes: 2 additions & 2 deletions src/lux.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@
orig_files :: [string()],
orig_args :: [string()],
prev_log_dir :: undefined | string(),
mode = execute :: lux:run_mode(),
mode = execute :: run_mode(),
skip_unstable = false :: boolean(),
skip_skip = false :: boolean(),
progress = brief :: silent | summary | brief |
Expand Down Expand Up @@ -405,7 +405,7 @@
orig_file :: string(),
pos_stack :: [#cmd_pos{}],
body_level :: non_neg_integer(),
mode :: lux:run_mode(),
mode :: run_mode(),
skip_unstable :: boolean(),
skip_skip :: boolean(),
multi_vars :: [[string()]], % ["name=val"]
Expand Down
2 changes: 2 additions & 0 deletions src/lux_args.erl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

-include("lux.hrl").

-dialyzer({no_return, badarg/2}).

-define(FILES, "--").

-spec specs() -> [spec()].
Expand Down
2 changes: 2 additions & 0 deletions test/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.PHONY: all debug clean info

all debug:
../bin/lux --file_pattern=.delux$$ --junit=true .

Expand Down

0 comments on commit 3c1bb1b

Please sign in to comment.