Skip to content
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

CheckstyleBear should error when use_spaces is False or indent_size is not 2 #898

Closed
jayvdb opened this issue Oct 12, 2016 · 3 comments
Closed

Comments

@jayvdb
Copy link
Member

jayvdb commented Oct 12, 2016

If checkstyle_configs = Google, indentation checking using 2 spaces, according to https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation

use_spaces=False must emit an error
indent_size must be set to 2, otherwise emit an error.

@sils
Copy link
Member

sils commented Oct 20, 2016

@jayvdb shouldn't we rather use like "google" as base and then modify according to the given settings?

tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 20, 2016
Closes coala#898 ensuring that if the checkstyle_config is google, then use_spaces has to be true and indent_size is 2.
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 20, 2016
Closes coala#898 ensuring that if the checkstyle_config is google, then use_spaces has to be true and indent_size is 2.
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
@jayvdb
Copy link
Member Author

jayvdb commented Oct 25, 2016

@sils , checkstyle will error if indent is not 2 spaces or tabs are used. It is not configurable.
If use_spaces = False, and another bear is using use_spaces, the two bears (checkstyle and other) will be in conflict with each other, and an error will occur from one or the other, leaving the user confused when the real problem is the configuration.

tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
@jayvdb
Copy link
Member Author

jayvdb commented Oct 25, 2016

It is not configurable.

Well, checkstyle is configurable, but we are not giving it a custom config file. We are giving it the google configuration. To allow overrides, we would need to create a custom config file, using the google xml file as the basis. That sounds like a large chunk of work, and is unlikely to be done quickly, so this is best handled as a bug fix for the current problem, and create a enhancement request for someone to rebuild this bear to support custom settings.

tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 25, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Oct 26, 2016
Add invalid_config function to CheckstyleBear.py
Add tests to invalid configurations

Closes coala#898
tylfin added a commit to tylfin/coala-bears that referenced this issue Nov 1, 2016
Adds invalid_config function to CheckstyleBear.py.
Adds tests for invalid configurations.

Closes coala#898.
tylfin added a commit to tylfin/coala-bears that referenced this issue Nov 2, 2016
Adds invalid_config function to CheckstyleBear.py.
Adds tests for invalid configurations.

Closes coala#898.
tylfin added a commit to tylfin/coala-bears that referenced this issue Nov 5, 2016
Adds invalid_config function to CheckstyleBear.py.
Adds tests for invalid configurations.

Closes coala#898.
gosom pushed a commit to gosom/coala-bears that referenced this issue Jul 15, 2017
Adds invalid_config function to CheckstyleBear.py.
Adds tests for invalid configurations.

Closes coala#898.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants