<commit_before>package main

import "github.com/howeyc/fsnotify"
import "log"
import "flag"
import "fmt"
import "path/filepath"
import "os"
import "os/exec"
import "regexp"

func Subfolders(path string) (paths []string) {
	filepath.Walk(path, func(newPath string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}

		if info.IsDir() {
			name := info.Name()
			// skip folders that begin with a dot
			hidden := filepath.HasPrefix(name, ".") && name != "." && name != ".."
			if hidden {
				return filepath.SkipDir
			} else {
				paths = append(paths, newPath)
			}
		}
		return nil
	})
	return paths
}

func main() {
	var helpFlag = flag.Bool("h",false,"help")
	var buildFlag = flag.Bool("b",false,"build")
	var testFlag = flag.Bool("t",false,"test")
	flag.Parse()
	args := flag.Args()

	var dirs = []string{}
	var cmds = []string{}

	if *helpFlag {
		fmt.Println("Usage: gomon [options] [dir] [-- command]")
		fmt.Println("   -b build")
		fmt.Println("   -t test")
		fmt.Println("   -h help")
		os.Exit(0)
	} else if *testFlag {
		cmds = []string{ "go", "test" }
	} else if *buildFlag {
		cmds = []string{ "go", "build" }
	} else {
		var takeDir = true
		for _, a := range args {
			if a == "--" {
				takeDir = false
				continue
			}
			if takeDir {
				dirs = append(dirs, a)<commit_msg>run GoFmt<commit_after>package main

import "github.com/howeyc/fsnotify"
import "log"
import "flag"
import "fmt"
import "path/filepath"
import "os"
import "os/exec"
import "regexp"

func Subfolders(path string) (paths []string) {
	filepath.Walk(path, func(newPath string, info os.FileInfo, err error) error {
		if err != nil {
			return err
		}

		if info.IsDir() {
			name := info.Name()
			// skip folders that begin with a dot
			hidden := filepath.HasPrefix(name, ".") && name != "." && name != ".."
			if hidden {
				return filepath.SkipDir
			} else {
				paths = append(paths, newPath)
			}
		}
		return nil
	})
	return paths
}

func main() {
	var helpFlag = flag.Bool("h", false, "help")
	var buildFlag = flag.Bool("b", false, "build")
	var testFlag = flag.Bool("t", false, "test")
	flag.Parse()
	args := flag.Args()

	var dirs = []string{}
	var cmds = []string{}

	if *helpFlag {
		fmt.Println("Usage: gomon [options] [dir] [-- command]")
		fmt.Println("   -b build")
		fmt.Println("   -t test")
		fmt.Println("   -h help")
		os.Exit(0)
	} else if *testFlag {
		cmds = []string{"go", "test"}
	} else if *buildFlag {
		cmds = []string{"go", "build"}
	} else {
		var takeDir = true
		for _, a := range args {
			if a == "--" {
				takeDir = false
				continue
			}
			if takeDir {
				dirs = append(dirs, a)
{'fraction_non_alphanumeric': 0.17249240121580547, 'fraction_numerical': 0.0007598784194528875, 'mean_word_length': 3.0507692307692307, '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': '2777353', 'n_tokens_mistral': 1085, 'n_tokens_neox': 973, 'n_words': 268}