<commit_before>_GOPATH 			:= $(PWD)/../../../..
export GOPATH := $(_GOPATH)
GENERATED_TYPES := bool string int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr byte rune float32 float64 complex64 complex128

.PHONY: all
all: codegen code

codegen: $(addprefix codegen-,$(GENERATED_TYPES))
	@# handle interface{} separately
	mkdir -p interface_tree
	cp -pa template/*.go ./interface_tree
	rm -f ./interface_tree/*_test.go
	rm -f ./interface_tree/types.go
	( cd interface_tree && sed -i "s/GeneratedType/interface{}/g" *.go )
	( cd interface_tree && sed -i 's/package template/package interface_tree/g' *.go )
	#
	mkdir -p interface_array_tree
	cp -pa template/*.go ./interface_array_tree
	rm -f ./interface_array_tree/*_test.go
	rm -f ./interface_array_tree/types.go
	( cd interface_array_tree && sed -i "s/GeneratedType/[]interface{}/g" *.go )
	( cd interface_array_tree && sed -i 's/package template/package interface_array_tree/g' *.go )

codegen-%:
	@echo "** generating $* tree"
	mkdir -p "./${*}_tree"
	cp -pa template/*.go "./${*}_tree"
	rm -f ./${*}_tree/*_test.go
	rm -f ./${*}_tree/types.go
	( cd "${*}_tree" && sed -i "s/GeneratedType/${*}/g" *.go )
	( cd "${*}_tree" && sed -i "s/package template/package ${*}_tree/g" *.go )
	#
	@echo "** generating []$* tree"
	mkdir -p "./${*}_array_tree"
	cp -pa template/*.go "./${*}_array_tree"
	rm -f ./${*}_array_tree/*_test.go
	rm -f ./${*}_array_tree/types.go
	( cd "${*}_array_tree" && sed -i "s/GeneratedType/[]${*}/g" *.go )
	( cd "${*}_array_tree" && sed -i "s/package template/package ${*}_array_tree/g" *.go )

.PHONY: clean
clean:
	rm -rf *_tree

.PHONY: code
code:
	go build `go list ./... | grep -v /vendor/ `

.PHONY: test
test:
	go test -v `go list ./... | grep -v /vendor/ `<commit_msg>Added trees for pointer payloads<commit_after>_GOPATH 			:= $(PWD)/../../../..
export GOPATH := $(_GOPATH)
GENERATED_TYPES := bool string int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 uintptr byte rune float32 float64 complex64 complex128

.PHONY: all
all: codegen code

codegen: $(addprefix codegen-,$(GENERATED_TYPES))
	@# handle interface{} separately
	mkdir -p interface_tree
	cp -pa template/*.go ./interface_tree
	rm -f ./interface_tree/*_test.go
	rm -f ./interface_tree/types.go
	( cd interface_tree && sed -i "s/GeneratedType/interface{}/g" *.go )
	( cd interface_tree && sed -i 's/package template/package interface_tree/g' *.go )
	#
	mkdir -p interface_array_tree
	cp -pa template/*.go ./interface_array_tree
	rm -f ./interface_array_tree/*_test.go
	rm -f ./interface_array_tree/types.go
	( cd interface_array_tree && sed -i "s/GeneratedType/[]interface{}/g" *.go )
	( cd interface_array_tree && sed -i 's/package template/package interface_array_tree/g' *.go )

codegen-%:
	@echo "** generating $* tree"
	mkdir -p "./${*}_tree"
	cp -pa template/*.go "./${*}_tree"
	rm -f ./${*}_tree/*_test.go
	rm -f ./${*}_tree/types.go
	( cd "${*}_tree" && sed -i "s/GeneratedType/${*}/g" *.go )
	( cd "${*}_tree" && sed -i "s/package template/package ${*}_tree/g" *.go )
	#
	@echo "** generating []$* tree"
	mkdir -p "./${*}_array_tree"
	cp -pa template/*.go "./${*}_array_tree"
	rm -f ./${*}_array_tree/*_test.go
	rm -f ./${*}_array_tree/types.go
	( cd "${*}_array_tree" && sed -i "s/GeneratedType/[]${*}/g" *.go )
	( cd "${*}_array_tree" && sed -i "s/package template/package ${*}_array_tree/g" *.go )
	#
	@echo "** generating *$* tree"
	mkdir -p "./${*}_ptr_tree"
	cp -pa template/*.go "./${*}_ptr_tree"
	rm -f ./${*}_ptr_tree/*_test.go
	rm -f ./${*}_ptr_tree/types.go
	( cd "${*}_ptr_tree" && sed -i "s/GeneratedType/\*${*}/g" *.go )
	( cd "${*}_ptr_tree" && sed -i "s/package template/package ${*}_ptr_tree/g" *.go )

.PHONY: clean
clean:
	rm -rf *_tree

.PHONY: code
code:
	go build `go list ./... | grep -v /vendor/ `

.PHONY: test
test:
	go test -v `go list ./... | grep -v /vendor/ `
{'fraction_non_alphanumeric': 0.20972329971554177, 'fraction_numerical': 0.011895526247737265, 'mean_word_length': 3.3706214689265535, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1280531', 'n_tokens_mistral': 1561, 'n_tokens_neox': 1507, 'n_words': 390}