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

For inline configuration use header from maven #192

Closed
Serranya opened this issue Dec 17, 2018 · 3 comments
Closed

For inline configuration use header from maven #192

Serranya opened this issue Dec 17, 2018 · 3 comments

Comments

@Serranya
Copy link
Contributor

We should use the header string from maven introduced in apache/maven-checkstyle-plugin@0de3460 for the reasons outlined in apache/maven-checkstyle-plugin#7.

@vorburger
Copy link
Member

sorry from a 23s glance over the linked issues I'm not getting what this is about, but if you want to raise a PR proposing something, I'm sure @erwint and others would be happy to review and possibly merge it ...

FYI there were previous discussions re. reporting in #118, if that is relevant to you here.

@Serranya
Copy link
Contributor Author

Yeah, I will open a PR.

The problem is:

we pass the inline checkstyle configuration to checkstyle as a xml file. This file needs to include a DTD header. But the header is different depending on the checkstyle version.

We could hardcode the known headers, but we would need to update this plugin everytime checkstyle updates their header.

Thats why the maven plugin specifies a default header and lets the user override it.

We should read the header value from the maven config and use that one instead of our hardcoded one:

private static final String CHECKSTYLE_CONFIG_FILE_HEADER =
"<?xml version=\"1.0\"?>\n" +
"<!DOCTYPE module PUBLIC \"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN\" " +
"\"https://checkstyle.org/dtds/configuration_1_3.dtd\">";

@Serranya
Copy link
Contributor Author

I just opened this issue so I don't forget to fix this.

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

2 participants