Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
tools: additional fixes for #14336 to pass ‘make lint’ when project p…
…ath contains non-ascii characters.
  • Loading branch information
sharkfisher committed Oct 6, 2017
commit 511286ee55d2f31a3d23e55aa0886350344f4c6e
4 changes: 2 additions & 2 deletions tools/cpplint.py
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ def RepositoryName(self):
fullname = self.FullName()
# XXX(bnoordhuis) Expects that cpplint.py lives in the tools/ directory.
toplevel = os.path.abspath(
os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/')
os.path.join(os.path.dirname(__file__), '..')).replace('\\', '/').decode('utf-8')
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you wrap this at 80 columns?

prefix = os.path.commonprefix([fullname, toplevel])
return fullname[len(prefix) + 1:]

Expand Down Expand Up @@ -6084,7 +6084,7 @@ def main():

_cpplint_state.ResetErrorCounts()
for filename in filenames:
ProcessFile(filename, _cpplint_state.verbose_level)
ProcessFile(filename.decode('utf-8'), _cpplint_state.verbose_level)
_cpplint_state.PrintErrorCounts()

sys.exit(_cpplint_state.error_count > 0)
Expand Down