SERVER-92234 Explicitly exempt formatting anything in build output dirs (#24481)
GitOrigin-RevId: 2c817e7cc42d1d8500c0e3ec147bf6ca00cd76e1
This commit is contained in:
@@ -30,3 +30,7 @@ version_expansions.yml
|
||||
|
||||
# Ignore all formatting in third_party/*
|
||||
src/third_party
|
||||
|
||||
# Ignore anything in the build output directories
|
||||
build
|
||||
bazel-*
|
||||
|
||||
@@ -5,8 +5,12 @@ import subprocess
|
||||
|
||||
|
||||
def run_prettier(prettier: pathlib.Path, check: bool) -> int:
|
||||
# Explicitly ignore anything in the output directories to prevent bad symlinks from failing the run,
|
||||
# see https://github.com/prettier/prettier/issues/11568 as to why it the paths being present in
|
||||
# .prettierignore isn't sufficient
|
||||
force_exclude_dirs = ["!./build", "!./bazel-bin", "!./bazel-out", "!./bazel-mongo"]
|
||||
try:
|
||||
command = [prettier, "."]
|
||||
command = [prettier, "."] + force_exclude_dirs
|
||||
if check:
|
||||
command.append("--check")
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user