<commit_before>TSFMT = $(call which,TSFMT,tsfmt)
TSLINT = $(call which,TSLINT,tslint)
$(foreach VAR,TSFMT TSLINT,$(call make-lazy,$(VAR)))

TSLINT_ARGS ?=
TSLINT_ARGS := \
	$(TSLINT_ARGS) \
	--format verbose \


SF_CHECK_TARGETS := \
	$(SF_CHECK_TARGETS) \
	check-tslint \

# ------------------------------------------------------------------------------

.PHONY: check-tslint
check-tslint:
	[[ "$(words $(TS_FILES))" = "0" ]] || { \
		$(TSLINT) $(TSLINT_ARGS) $(TS_FILES) || { \
			$(TSLINT) $(TSLINT_ARGS) --fix $(TS_FILES) 2>/dev/null >&2; \
			exit 1; \
		}; \
		$(TSFMT) --verify -- $(TS_FILES) || { \
			$(TSFMT) --replace -- $(TS_FILES) 2>/dev/null >&2; \
			exit 1; \
		}; \
	}<commit_msg>breaking: stop using typescript-formatter<commit_after>TSLINT = $(call which,TSLINT,tslint)
$(foreach VAR,TSLINT,$(call make-lazy,$(VAR)))

TSLINT_ARGS ?=
TSLINT_ARGS := \
	$(TSLINT_ARGS) \
	--format verbose \


SF_CHECK_TARGETS := \
	$(SF_CHECK_TARGETS) \
	check-tslint \

# ------------------------------------------------------------------------------

.PHONY: check-tslint
check-tslint:
	[[ "$(words $(TS_FILES))" = "0" ]] || { \
		$(TSLINT) $(TSLINT_ARGS) $(TS_FILES) || { \
			$(TSLINT) $(TSLINT_ARGS) --fix $(TS_FILES) 2>/dev/null >&2; \
			exit 1; \
		}; \
	}
{'fraction_non_alphanumeric': 0.32436708860759494, 'fraction_numerical': 0.00870253164556962, 'mean_word_length': 2.108108108108108, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1330571', 'n_tokens_mistral': 534, 'n_tokens_neox': 498, 'n_words': 79}