Open GoogleCodeExporter opened 9 years ago
I had the same problem.
The error seems to be that all Windows-backslashes ("\") are replaced by
unix-style forward slashes ("/") in the file paths. But then it is tried to
erase the given root folder in the file headers with the os-specific-slash (for
Windows the backslash).
Current codeline in cpplint.py (line 1393):
file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root)
where an example file_path_from_root is 'src/foo/bar.h'
This leads to the seen error.
Quick fix for me was to change the line to
file_path_from_root = re.sub('^' + _root + '/', '', file_path_from_root)
Original comment by christop...@gmail.com
on 15 Jun 2014 at 12:53
I also had the same issue.
I fixed the issue by removing the os.sep totally from the line
file_path_from_root = re.sub('^' + _root + os.sep, '', file_path_from_root)
and instead added the '/' to the --root definition.
Original comment by ksole...@gmail.com
on 1 Oct 2014 at 6:46
Original issue reported on code.google.com by
Florian....@gmail.com
on 12 Mar 2014 at 5:09