in admin/lint/checks.go [192:235]
func checkAll(workspaceDir string, file string) bool {
isBuildFile := filepath.Base(file) == "Makefile.in"
// If a file starts with an upper-case letter, assume it's supporting package documentation
// (all those files in the root directory) and avoid linting it.
isDocumentation := mustMatch(`^[A-Z]`, filepath.Base(file)) && !isBuildFile
log.Printf("Linting file %s", file)
ok := true
runCheck := func(checker func(string, string) error, file string) {
if err := checker(workspaceDir, file); err != nil {
fmt.Fprintf(os.Stderr, "%s: %v\n", file, err)
ok = false
}
}
checkLineLength80 := func(workspaceDir string, file string) error {
return checkLineLength(workspaceDir, file, 80)
}
checkLineLength100 := func(workspaceDir string, file string) error {
return checkLineLength(workspaceDir, file, 100)
}
if !isDocumentation && filepath.Base(file) != "settings.json.in" {
runCheck(checkLicense, file)
}
if filepath.Ext(file) == ".go" {
runCheck(checkGofmt, file)
runCheck(checkGolint, file)
} else if filepath.Ext(file) == ".rs" {
runCheck(checkNoTabs, file)
runCheck(checkLineLength100, file)
} else if mustMatch("^\\.[0-9]$", filepath.Ext(file)) {
runCheck(checkManpage, file)
runCheck(checkLineLength80, file)
} else if !isBuildFile {
runCheck(checkNoTabs, file)
runCheck(checkLineLength80, file)
}
return ok
}