rizsotto / scan-build

Clang's scan-build re-implementation in python
Other
362 stars 34 forks source link

Handle os.path.commonprefix exceptions #124

Closed ChaKiG closed 4 years ago

ChaKiG commented 4 years ago

On Windows, when using different drives between source and report, commonprefix raises an exception "ValueError("path is on mount %r, start on mount %r" % (path_drive, start_drive))" (see https://github.com/python/cpython/blob/master/Lib/ntpath.py#L703)

Fixes #123

rizsotto commented 4 years ago

Thank you Thomas for this fix. I don't have access to windows machines, so I'm not sure I could have fixed this.

ChaKiG commented 4 years ago

I do not know how I got my first conclusion, but it was wrong. It was not "commonprefix" but "chop" that raised an exception. In fact, seeing the implementation of "commonprefix", it should never raise an Exception.

It looks like the ENV settings for your checks don't work correctly on windows, so I get a lot of fails in INTERCEPT_BUILD (which if I understand correctly ca not work on Windows). Still, I added a UnitTest for this behavior.

Best Regards