<commit_before>#
# Makefile for Go.bbpackage
#

GOROOT ?= $(shell go env GOROOT)

SRC_DIR = ./src
PKG = ./Go.bbpackage
CONTENTS_DIR = $(PKG)/Contents

COMPLETION_DIR = $(CONTENTS_DIR)/Completion\ Data/Go
TAGOBJ := ./gostdlib.tags
TAGFILE := $(COMPLETION_DIR)/Go\ Standard\ Library.tags
CTAGS_CMD ?= /Applications/BBEdit.app/Contents/Resources/ctags
CTAGS_ARGS = --recurse --extra=+p+q+r --fields=+a+m+n+S --excmd=number --tag-relative=no --sort=no \
	--exclude=.git --exclude="*_test.go" --exclude="**/testdata/**" --exclude="**/internal/**"

.DEFAULT: all

.PHONY: all clean install tags ctags test

all: build tags

clean:
	-rm -rf $(PKG)

install: all
	open $(PKG)/.

build: $(PKG)

$(PKG):
	mkdir -p $(CONTENTS_DIR)
	cp README.md $(PKG)/.
	cp LICENSE $(PKG)/.
	cp -R $(SRC_DIR)/* $(CONTENTS_DIR)/.

test:
	go build test.go

tags: $(TAGFILE)

$(TAGFILE):
	$(CTAGS_CMD) $(CTAGS_ARGS) -f - $(GOROOT)/src | grep -v -E '^(\w+[.])?[^A-Z]\w+\s+\S+\s\d+[;]["]\s+[cfimstv]' > $(TAGOBJ)
	mkdir -p $(COMPLETION_DIR)
	mv $(TAGOBJ) $(TAGFILE)<commit_msg>Build xib<commit_after>#
# Makefile for Go.bbpackage
#

GOROOT ?= $(shell go env GOROOT)

SRC_DIR = ./src
PKG = ./Go.bbpackage
CONTENTS_DIR = $(PKG)/Contents

COMPLETION_DIR = $(CONTENTS_DIR)/Completion\ Data/Go
TAGOBJ := ./gostdlib.tags
TAGFILE := $(COMPLETION_DIR)/Go\ Standard\ Library.tags
CTAGS_CMD ?= /Applications/BBEdit.app/Contents/Resources/ctags
CTAGS_ARGS = --recurse --extra=+p+q+r --fields=+a+m+n+S --excmd=number --tag-relative=no --sort=no \
	--exclude=.git --exclude="*_test.go" --exclude="**/testdata/**" --exclude="**/internal/**"

.DEFAULT: all

.PHONY: all clean install tags ctags test

all: build tags

clean:
	-rm -rf $(PKG)

install: all
	open $(PKG)/.

build: $(PKG)

$(PKG):
	mkdir -p $(CONTENTS_DIR)
	cp README.md $(PKG)/.
	cp LICENSE $(PKG)/.
	cp -R $(SRC_DIR)/* $(CONTENTS_DIR)/.
	xcrun ibtool $(SRC_DIR)/Resources/go\ doc.xib  --compile $(CONTENTS_DIR)/Resources/go\ doc.xib	

test:
	go build test.go

tags: $(TAGFILE)

$(TAGFILE):
	$(CTAGS_CMD) $(CTAGS_ARGS) -f - $(GOROOT)/src | grep -v -E '^(\w+[.])?[^A-Z]\w+\s+\S+\s\d+[;]["]\s+[cfimstv]' > $(TAGOBJ)
	mkdir -p $(COMPLETION_DIR)
	mv $(TAGOBJ) $(TAGFILE)
{'fraction_non_alphanumeric': 0.2244617498854787, 'fraction_numerical': 0.0, 'mean_word_length': 3.8105726872246697, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6007148', 'n_tokens_mistral': 979, 'n_tokens_neox': 950, 'n_words': 197}