-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
exclude paths vs CodeClimate #325
Comments
Exclude uses relative paths as specified here http://haxecheckstyle.github.io/docs/haxe-checkstyle/setup.html#exclude-packagesclasses The usage of dot structure may be the problem here as it's easy to misunderstand that with package names. |
Ok, but is there a way to configure CodeClimate to run on the "correct relative paths"?. |
Also, note that exclude paths work with To fix the issue you can revert code climate changes and change the exclude path to I think it should work. Give it a try and let me know. |
I will update the docs if it works. |
Hm, that kind of conflicts with my local usage of checkstyle where I run it with |
Can't think of any other better solution atm. Will keep this open. |
Hm, I guess I still don't fully understand the issue, since running |
Are you sure? AFAIK only |
Looking into it a bit more closely, running checkstyle with |
Just added |
Using absolute paths should solve this issue. Let me know otherwise.
|
By absolute paths, you mean paths starting with the drive letter ( Either way the bigger issue here is that I haven't been able to figure out why checkstyle dies after 7% yet (except that the file that causes issues is |
It should be easy to reproduce if you clone the Flixel repo:
|
Oh, I forgot to mention: checkstyle with haxeparser 3.3.0 is probably going to die even earlier for you because of HaxeCheckstyle/haxeparser#38. |
By absolute paths, I mean the path from where you are running haxe-checkstyle which is ideally the project root folder. So it should work for all the following cases:
Your exclude should look like: "exclude": {
"path": "relative",
"AvoidStarImport": [
"tests/unit/src/flixel/math/FlxRandomTest"
]
} |
Oh, I see. That should indeed solve that problem. 👍 Although it might be a bit confusing terminology-wise (I associate something different with "absolute path"). It's really more of a Would you prefer I open a separate issue for that |
You are right. Both are relative paths. Should we simply go with BTW,
If you still want to track it, separate issue would be better. Let's keep this open until we sort out the naming. |
An "enum" might be more flexible if you wanted to support "real" absolute paths at some point? |
|
Aka "json enum" / "enum for poor people, which is really just a string value". :D |
😄 |
Hm, that's quite strange... I wonder what makes the difference there. I'm assuming we're using the same Haxe and Neko versions (Haxe 3.4.0 and Neko 2.1.0 respectively). Different OS probably? Windows 10 here. |
macOS Sierra here. |
same here on Linux, so potentially a Windows issue? |
Wow, you may be right.. I can't reproduce it in Bash on Windows either. I have no idea where to even start with debugging this one... I guess isolating it would help. The only thing that seems special about that file is this variable with a very long initializer: https://github.com/HaxeFlixel/flixel/blob/dev/flixel/graphics/frames/FlxBitmapFont.hx#L31 And sure enough, it doesn't die anymore if I remove that. I'll open a separate issue. |
It looks like
exclude
incheckstyle.json
is not working properly for CodeClimate. There's currently this issue being reported for Flixel:https://codeclimate.com/github/HaxeFlixel/flixel/issues
This shouldn't happen, because it's specifically excluded in
checkstyle.json
.I did a bit of experimenting locally, and it looks like when running the following in the Flixel repo, there are no issues reported:
However, with these, there are:
So it seems like the exclude check only works when
-s
matches the root package exactly (I guess the exclude path uses the relative path to check packages, rather than parsing the package statement?).I've made two attempts to fix this by changing the
.codeclimate.yml
config, but they didn't help:HaxeFlixel/flixel@7c4309d
HaxeFlixel/flixel@884a5e2
The text was updated successfully, but these errors were encountered: