closure-linter icon indicating copy to clipboard operation
closure-linter copied to clipboard

Exlusion for fixjsstyle-script.py does not work correct on Windows OS

Open GoogleCodeExporter opened this issue 10 years ago • 0 comments

What steps will reproduce the problem?
1. when using scripts\fixjsstyle-script.py script
2. I try to exclude some files and folders by using:
   -e editor -x jquery,.min.js,iscroll-lite.js

What is the expected output? What do you see instead?
I expect that these files would be excluded from fixing.
However the files are not 

What version of the product are you using? On what operating system?
2.3.5

Please provide any additional information below.

I fixed it by changing the line 155 in simplefileflags.py making it more 
exhaustive:
if f.endswith('/' + exclude) or f.endswith(exclude) or exclude in f or f == 
exclude:

The initial code based on ('/' + exclude) DOES NOT WORK ON WINDOWS as the 
Windows paths should be ('\\' + exclude).

(I'm not a Python developer, so I think the exclusion code can be simpler.)

My suggestion would be not only to exclude a specific resource but also to 
accept "*" exclusion patterns, not only the specified file. 

This would make it more flexible.

Original issue reported on code.google.com by [email protected] on 16 Jul 2013 at 8:44

GoogleCodeExporter avatar Jun 17 '15 06:06 GoogleCodeExporter