-
-
Notifications
You must be signed in to change notification settings - Fork 757
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
VariableMinLength is in the wrong category #843
Comments
Totally right. Thanks for reporting! |
Could not reproduce it.
this configuration works for me and reports:
Are you sure you used RC6-4? Some versions ago we moved all naming rules from style to the new ruleset ... |
Truth be told I am using detekt through https://github.com/vanniktech/gradle-code-quality-tools-plugin so if you can't reproduce the issue might stem from there. I've seen the author @vanniktech is active on this project when trying to debug this issue, so maybe he can shed some light on the matter, but if you'd rather go ahead and close this, I can open a ticket there. And to answer your question I supposedly am, relevant configuration for codeQualityTools looks like this:
|
is indeed correct. Is your yml configuration file for detekt under |
Yes, if I move the file gradle check fails with: |
Is the project open source and I can take a look at it? Otherwise it's hard for me to debug. Also make sure to be on 0.10.0 of the Gradle Plugin. |
Unfortunately the project is not open source. I'm indeed using version 0.10.0: I can set up a small project this afternoon to demonstrate if you want. If it's any help a detekt.yml containing only:
fails with a variable length of 2, but this one doesn't:
|
It works for me correctly. Here's a branch where you can play around with it - https://github.com/vanniktech/junit-rules/tree/VariableMinLength Note though that |
Can we close this issue? |
I'd say yes. |
Worst case we're continuing in an issue on my repo. |
Ok, if it turns out to be an issue in detekt feel free to reopen :) |
@arturbosch I've debugged it and the problem is only when you also use |
Ok, any idea what is causing it? You had a minimal example repository? |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related topics. |
Expected Behavior
Defining VariableMinLength under naming (as the default configuration does) should work, but doesn't
Current Behavior
If defined under naming the setting is ignored, instead it uses a default value of 3? and is reported under style instead of naming. Defining VariableMinLength under style does work.
Steps to Reproduce (for bugs)
Use default configuration and create a variable with an identifier length of 1 or 2
Context
It should go under naming to be honest
Your Environment
The text was updated successfully, but these errors were encountered: