Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b1e2a38

Browse filesBrowse files
sharkfishergibfahn
authored andcommitted
tools: fix cpplint.py when path contains non-ascii
PR-URL: #16047 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
1 parent 24fd8ff commit b1e2a38
Copy full SHA for b1e2a38

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎tools/cpplint.py‎

Copy file name to clipboardExpand all lines: tools/cpplint.py
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1074,8 +1074,8 @@ def RepositoryName(self):
10741074
"""
10751075
fullname = self.FullName()
10761076
# XXX(bnoordhuis) Expects that cpplint.py lives in the tools/ directory.
1077-
toplevel = os.path.abspath(
1078-
os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/')
1077+
toplevel = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) \
1078+
.replace('\\', '/').decode('utf-8')
10791079
prefix = os.path.commonprefix([fullname, toplevel])
10801080
return fullname[len(prefix) + 1:]
10811081

@@ -6084,7 +6084,7 @@ def main():
60846084

60856085
_cpplint_state.ResetErrorCounts()
60866086
for filename in filenames:
6087-
ProcessFile(filename, _cpplint_state.verbose_level)
6087+
ProcessFile(filename.decode('utf-8'), _cpplint_state.verbose_level)
60886088
_cpplint_state.PrintErrorCounts()
60896089

60906090
sys.exit(_cpplint_state.error_count > 0)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.