Microsoft Windows support
jayvdb opened this issue · 3 comments
Need Appveyor builds running the tests, and the tests probably need overhauling to use os.sep
.
Some rough notes...
Personally, I think the paths in the filename selector rules must be unix format, as these rules should work on both unix and dos.
Also a leading and trailing /
are used to wrap a regex selector, as /
is an silly start of a filename within flake8 as filenames should be from the root of the project, not root of the filesystem. We need to do some analysis for how flake8 handles filenames outside of the current working directory, to see whether it ever sends filenames starting with /
. If flake8 can send filenames starting with /
on unix, then we may see C:\...
style paths on Windows, and even crazier UNC paths.
Also, \
is a reserved character needed for advanced regex, so it is nice to avoid it being used as a Windows path separator.
There could be an UserWarning
when the rule use \
on Windows. indicating that they will not match a filename.
On Windows, the filenames seen by flake8-putty
are directory separated by os.sep
, and have a leading .\\
e.g. '.\flake8_putty\config.py'
The appveyor
branch has the necessary fixes and Appveyor build control file, with tests and dogfooding passing at https://ci.appveyor.com/project/jayvdb/flake8-putty
Probably should also look at running flake8 under msys and cygwin, to iron out any issues hiding under those rocks.
I am going to let it sit there for a bit, while I do a little more analysis (and work out if there is anything else to go into v0.3, as Windows support should be v0.4)