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

How to extend/override an existing configuration (sun, google) #4484

Closed
binkley opened this issue Jun 21, 2017 · 2 comments
Closed

How to extend/override an existing configuration (sun, google) #4484

binkley opened this issue Jun 21, 2017 · 2 comments

Comments

@binkley
Copy link

binkley commented Jun 21, 2017

I'd like to slightly modify the existing sun_checks.xml without copying it into my project. This way I'd pick up improvements in newer version of checkstyle for Sun style (or Google as well), and only keep my modifications.

In particular, I'd like to set NewLineAtEndOfFile property lineSeparator to lf rather than use the system ending. The code base uses UNIX endings regardless of developer platform.

Perhaps this is a limitation of the maven plugin, and not in checkstyle? Trying to provide configuration of both configLocation and checkstyleRules (inline config in pom.xml) is not supported.

Any suggestions would be appreciated!

@rnveach
Copy link
Member

rnveach commented Jun 21, 2017

I'd like to slightly modify the existing sun_checks.xml without copying it into my project.

This is not possible right now. You must physically copy the file right now and make changes as you wish.

There was a discussion of providing a way to allow this at #2873 , but it hasn't gone anywhere.

Perhaps this is a limitation of the maven plugin, and not in checkstyle?

This is a limitation of checkstyle. Plugins could still do 'hacks' to somehow allow it, but CS doesn't allow it at this time.

@romani
Copy link
Member

romani commented Jun 22, 2017

@binkley ,

I'd like to slightly modify the existing sun_checks.xml

just FYI, this config is not complete coverage of sun code convention. It is some state that might be very similar. Detailed coverage http://checkstyle.sourceforge.net/sun_style.html is not done yet.
We have good coverage only for google style guide - http://checkstyle.sourceforge.net/google_style.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants