func createTestFS(its *assert.Assertions) (tempDir string, revert func()) {
	// create a temp dir
	var err error
	tempDir, err = ioutil.TempDir("", "copyright_test")
	its.Nil(err)
	revert = func() {
		os.RemoveAll(tempDir)
	}

	// create some files
	err = os.MkdirAll(filepath.Join(tempDir, "foo", "bar"), 0755)
	its.Nil(err)
	err = os.MkdirAll(filepath.Join(tempDir, "bar", "foo"), 0755)
	its.Nil(err)

	err = os.MkdirAll(filepath.Join(tempDir, "not-bar", "not-foo"), 0755)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "foo", "bar", "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "foo", "bar", "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "foo", "bar", "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "bar", "foo", "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "bar", "foo", "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "bar", "foo", "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "not-bar", "not-foo", "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "not-bar", "not-foo", "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)

	err = ioutil.WriteFile(filepath.Join(tempDir, "not-bar", "not-foo", "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)
	return
}
// createTestFS creates a temp dir with files in them, with _no_ copyright headers.
//
// there should be at least (1) failure.
createTestFS creates a temp dir with files in them, with _no_ copyright headers.

there should be at least (1) failure.
// createTestFS creates a temp dir with files in them with _no_ copyright headers . // // there should be at least ( 1 ) failure .
func createTestFS(its *assert.Assertions) (tempDir string, revert func()) {
	var err error
	tempDir, err = ioutil.TempDir("", "copyright_test")
	its.Nil(err)
	revert = func() {
		os.RemoveAll(tempDir)
	}
	err = os.MkdirAll(filepath.Join(tempDir, "foo", "bar"), 0755)
	its.Nil(err)
	err = os.MkdirAll(filepath.Join(tempDir, "bar", "foo"), 0755)
	its.Nil(err)
	err = os.MkdirAll(filepath.Join(tempDir, "not-bar", "not-foo"), 0755)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "foo", "bar", "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "foo", "bar", "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "foo", "bar", "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "bar", "foo", "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "bar", "foo", "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "bar", "foo", "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "not-bar", "not-foo", "file0.py"), []byte(pyFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "not-bar", "not-foo", "file0.ts"), []byte(tsFile0), 0644)
	its.Nil(err)
	err = ioutil.WriteFile(filepath.Join(tempDir, "not-bar", "not-foo", "file0.go"), []byte(goFile0), 0644)
	its.Nil(err)
	return
}
func createTestFS ( its * assert . Assertions ) ( tempDir string , revert func ( ) ) { var err error tempDir , err = ioutil . TempDir ( " " , " " ) its . Nil ( err ) revert = func ( ) { os . RemoveAll ( tempDir ) } err = os . MkdirAll ( filepath . Join ( tempDir , " " , " " ) , 0755 ) its . Nil ( err ) err = os . MkdirAll ( filepath . Join ( tempDir , " " , " " ) , 0755 ) its . Nil ( err ) err = os . MkdirAll ( filepath . Join ( tempDir , " " , " " ) , 0755 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " ) , [ ] byte ( pyFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " ) , [ ] byte ( tsFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " ) , [ ] byte ( goFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( pyFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( tsFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( goFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( pyFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( tsFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( goFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( pyFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( tsFile0 ) , 0644 ) its . Nil ( err ) err = ioutil . WriteFile ( filepath . Join ( tempDir , " " , " " , " " ) , [ ] byte ( goFile0 ) , 0644 ) its . Nil ( err ) return }
createTestFS creates a temp dir with files in them, with _no_ copyright headers.
createTestFS creates a temp dir with files in them with _no_ copyright headers .
// create a temp dir // create some files