Use the condensed library name when fixing "foo:foo" dependencies
The styleguide prefers using condensed library nam "foo" instead of "foo:foo" whenever possible. The script would address absolute and relative paths in other directories but not the ones in the current directory. Bug: None Change-Id: Ibc7850cd26edfe8fb864ce5baa2f460a95a7c96d Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/266489 Commit-Queue: Florent Castelli <orphis@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/main@{#37315}
This commit is contained in:
parent
6189207e1a
commit
523b67d69b
@ -180,6 +180,8 @@ def main():
|
|||||||
dep = Rebase(path, dep_path, dep)
|
dep = Rebase(path, dep_path, dep)
|
||||||
# Replacing /target:target with /target
|
# Replacing /target:target with /target
|
||||||
dep = re.sub(r'/(\w+):(\1)$', r'/\1', dep)
|
dep = re.sub(r'/(\w+):(\1)$', r'/\1', dep)
|
||||||
|
# Replacing target:target with target
|
||||||
|
dep = re.sub(r'^(\w+):(\1)$', r'\1', dep)
|
||||||
path = os.path.join(path[2:], 'BUILD.gn')
|
path = os.path.join(path[2:], 'BUILD.gn')
|
||||||
errors_by_file[path][target].add(dep)
|
errors_by_file[path][target].add(dep)
|
||||||
elif error[index + 1] == 'has a source file:':
|
elif error[index + 1] == 'has a source file:':
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user