Skip to content

Commit f84ae29

Browse files
committed
config: isTemporaryFile -> isIgnoredFile
1 parent 49f850f commit f84ae29

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

‎config/loader.go‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ func dirFiles(dir string) ([]string, []string, error) {
162162
// Only care about files that are valid to load
163163
name := fi.Name()
164164
extValue := ext(name)
165-
if extValue == "" || isTemporaryFile(name) {
165+
if extValue == "" || isIgnoredFile(name) {
166166
continue
167167
}
168168

@@ -183,10 +183,9 @@ func dirFiles(dir string) ([]string, []string, error) {
183183
return files, overrides, nil
184184
}
185185

186-
// isTemporaryFile returns true or false depending on whether the
187-
// provided file name is a temporary file for the following editors:
188-
// emacs or vim.
189-
func isTemporaryFile(name string) bool {
186+
// isIgnoredFile returns true or false depending on whether the
187+
// provided file name is a file that should be ignored.
188+
func isIgnoredFile(name string) bool {
190189
return strings.HasPrefix(name, ".") || // Unix-like hidden files
191190
strings.HasSuffix(name, "~") || // vim
192191
(strings.HasPrefix(name, "#") && strings.HasSuffix(name, "#")) // emacs

0 commit comments

Comments
 (0)