Skip to content

Commit

Permalink
Generate an Erlang LS config file (2600hz#6353)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesaimonetti authored Feb 29, 2020
1 parent fe53ee8 commit bc4ad54
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ core/kazoo_proper/priv/mp3.mp3
/make/pest-*
# asdf-vm "local" versions handler
.tool-versions
/erlang_ls.config
18 changes: 17 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ DEPS_DIR = $(ROOT)/deps
RELX = $(DEPS_DIR)/relx
ELVIS = $(DEPS_DIR)/elvis
TAGS = $(ROOT)/TAGS
ERLANG_LS = $(ROOT)/erlang_ls.config
PLT = $(ROOT)/.kazoo.plt

ERLANG_MK = $(ROOT)/erlang.mk
ERLANG_MK_COMMIT = 82179575d9191305805c8e6e8107be7c3f80a6be
Expand Down Expand Up @@ -183,6 +185,21 @@ $(TAGS):
clean-tags:
$(if $(wildcard $(TAGS)), rm $(TAGS))

erlang-ls: $(ERLANG_LS)

$(ERLANG_LS):
@touch $(ERLANG_LS)
@echo "plt_path: $(PLT)" >> $(ERLANG_LS)
@echo "apps_dirs: " >> $(ERLANG_LS)
@echo " - $(ROOT)/core/*" >> $(ERLANG_LS)
@echo " - $(ROOT)/applications/*" >> $(ERLANG_LS)
@echo "deps_dirs: " >> $(ERLANG_LS)
@echo " - $(ROOT)/deps/*" >> $(ERLANG_LS)
@echo "generated $(ERLANG_LS)"

clean-erlang-ls:
@rm $(ERLANG_LS)

$(RELX):
wget 'https://erlang.mk/res/relx-v3.27.0' -O $@
chmod +x $@
Expand Down Expand Up @@ -224,7 +241,6 @@ fixture_shell:

DIALYZER ?= dialyzer
DIALYZER += --statistics --no_native
PLT ?= .kazoo.plt

OTP_APPS ?= erts kernel stdlib crypto public_key ssl asn1 inets xmerl
EXCLUDE_DEPS = $(DEPS_DIR)/erlang_localtime/ebin
Expand Down

0 comments on commit bc4ad54

Please sign in to comment.