<commit_before>package main

import (
	"log"
	"os"
	"path/filepath"
)

const vendorDir = "vendor"

func main() {
	wd, err := os.Getwd()
	if err != nil {
		log.Fatalf("Error getting working directory: %v", err)
	}
	log.Println("Collecting local packages list")
	initPkgs, err := collectPkgs(wd)
	if err != nil {
		log.Fatalf("Error collecting initial packages: %v", err)
	}
	log.Println("Init pkgs:")
	for _, pkg := range initPkgs {
		log.Printf("\t%s\n", pkg.ImportPath)
	}
	cfg, err := os.Open("vendorConfig")
	if err != nil {
		log.Fatalf("Failed to open config file: %v", err)
	}
	deps, err := parseDeps(cfg, filepath.Join(wd, vendorDir))
	if err != nil {
		log.Fatalf("Failed to parse config: %v", err)<commit_msg>Add GOPATH check<commit_after>package main

import (
	"log"
	"os"
	"path/filepath"
)

const vendorDir = "vendor"

func main() {
	if os.Getenv("GOPATH") == "" {
		log.Fatal("GOPATH must be set")
	}
	wd, err := os.Getwd()
	if err != nil {
		log.Fatalf("Error getting working directory: %v", err)
	}
	log.Println("Collecting local packages list")
	initPkgs, err := collectPkgs(wd)
	if err != nil {
		log.Fatalf("Error collecting initial packages: %v", err)
	}
	log.Println("Init pkgs:")
	for _, pkg := range initPkgs {
		log.Printf("\t%s\n", pkg.ImportPath)
	}
	cfg, err := os.Open("vendorConfig")
	if err != nil {
		log.Fatalf("Failed to open config file: %v", err)
	}
	deps, err := parseDeps(cfg, filepath.Join(wd, vendorDir))
	if err != nil {
		log.Fatalf("Failed to parse config: %v", err)
{'fraction_non_alphanumeric': 0.16976127320954906, 'fraction_numerical': 0.0, 'mean_word_length': 4.01328903654485, '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': '3410427', 'n_tokens_mistral': 596, 'n_tokens_neox': 583, 'n_words': 155}