@@ -74,21 +74,6 @@ configure(rootProject) {
74
74
logger. warn(" WARNING: Directory is not a valid git checkout (won't check dirty files): ${ rootProject.projectDir} " )
75
75
}
76
76
} else {
77
- // git ignores any folders which are empty (this includes folders with recursively empty sub-folders).
78
- def untrackedNonEmptyFolders = status. untrackedFolders. findAll { path ->
79
- File location = file(" ${ rootProject.projectDir} /${ path} " )
80
- boolean hasFiles = false
81
- Files . walkFileTree(location. toPath(), new SimpleFileVisitor<Path > () {
82
- @Override
83
- FileVisitResult visitFile (Path file , BasicFileAttributes attrs ) throws IOException {
84
- hasFiles = true
85
- // Terminate early.
86
- return FileVisitResult . TERMINATE
87
- }
88
- })
89
- return hasFiles
90
- }
91
-
92
77
def offenders = [
93
78
// Exclude staged changes. These are fine in precommit.
94
79
// "(added)": status.added,
@@ -97,8 +82,7 @@ configure(rootProject) {
97
82
" (conflicting)" : status. conflicting,
98
83
" (missing)" : status. missing,
99
84
" (modified)" : status. modified,
100
- " (untracked)" : status. untracked,
101
- " (untracked non-empty dir)" : untrackedNonEmptyFolders
85
+ " (untracked)" : status. untracked
102
86
]. collectMany { fileStatus , files ->
103
87
files. collect {file -> " - ${ file} ${ fileStatus} " }
104
88
}. sort()
0 commit comments