Bug 1411004 - ./mach clang-format: Better handling of relative paths r=mystor=mystor
For example, this is addressing the issue: ./mach clang-format -p ./mfbt/ MozReview-Commit-ID: Le8mPTOEfA7
This commit is contained in:
@@ -304,7 +304,8 @@ class FormatProvider(MachCommandBase):
|
||||
# Remove comments and empty lines
|
||||
if line.startswith('#') or len(line.strip()) == 0:
|
||||
continue
|
||||
ignored_dir.append(line.rstrip())
|
||||
# The regexp is to make sure we are managing relative paths
|
||||
ignored_dir.append("^[\./]*" + line.rstrip())
|
||||
|
||||
# Generates the list of regexp
|
||||
ignored_dir_re = '(%s)' % '|'.join(ignored_dir)
|
||||
|
||||
Reference in New Issue
Block a user