#111483Check for spaces in paths reports ignored files
Description
Problem
Build/Scripts/spacesInPathsAndFilenames.sh runs in the pre-commit hook and as runTests.sh -s checkFilesAndPathsForSpaces. It scans the whole checkout with find ., including folders git ignores. Chromium of the JavaScript and end to end tests creates .cache/.config/chromium/Crash Reports in the home folder the test containers use, so after any such run every commit reports
>> ERROR: There are spaces in file or path names.
@- ‘./.cache/.config/chromium/Crash Reports’‘@
although nothing of it can be committed. The line also carries a second closing quote.
Related to #104923, which added the check.
Steps to reproduce
- Run
./Build/Scripts/runTests.sh -s unitJavascript(or create the folder.cache/.config/chromium/Crash Reportsby hand;.cacheis ignored). - Run
./Build/Scripts/runTests.sh -s checkFilesAndPathsForSpaces, or commit anything: the check fails on the ignored folder.
Suggested fix
Check the paths git knows instead of the file system: tracked, staged and new files not yet added, without ignored ones (git ls-files --cached --others --exclude-standard), and print each path with one pair of quotes. A new or staged file with a space in its path still fails the check.
Reviews 2
History 13
-
Gerrit Code Review pushed patch set 1 for main to change 97765 status
NewUnder Review <span data-processor="relativetime" data-value="2026-11-17T17:52:17+00:00" > 11/17/26, 17:52 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 97771 <span data-processor="relativetime" data-value="2026-11-18T03:58:54+00:00" > 11/18/26, 03:58 </span>
-
Benjamin Kott commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-11-18T04:15:21+00:00" > 11/18/26, 04:15 </span>
Applied in changeset commit:d0a94326f50206a2bb88ac604989862da0b583b6.