You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by Denes Arvay <de...@cloudera.com> on 2016/07/18 13:22:15 UTC

Re: [DISCUSS] Checkstyle maven plugin

Hi All,

I was setting up the checkstyle plugin in IntelliJ (
https://plugins.jetbrains.com/plugin/1065) and it turned out that the
suppression file should be referenced from the checkstyle.xml to be used by
the plugin so I added it to the checkstyle config. Please check the
attached diff.

Remarks: I wasn't able to configure it so that maven checkstyle plugin
could load the suppression file (the only way it worked was referring to it
with absolute path) so I marked it as optional and the maven plugin will
get the file's location from the configuration in the pom.xml.

Please share your opinion whether it's a useful addition or not.

I also created an IntelliJ code style definition xml based on the
checkstyle rules:
https://gist.github.com/adenes/bc848389c30b59eea400469a1d5e4b49

Cheers,
Denes

Re: [DISCUSS] Checkstyle maven plugin

Posted by Mike Percy <mp...@apache.org>.
Hi Denes, thanks for doing this!

If you are going to add the suppression filter to the checkstyle XML file
then please remove it from the Maven config (but please test that it still
works).

(Also, if you want to try fixing some of the underlying issues and removing
suppressions I would be happy to review the patch.)

If you'd like to contribute the IntelliJ code style file to the project,
please add an ASL2.0 license header at the top of the XML file. Otherwise
it won't pass a RAT check. See pom.xml for an example.

I am not sure if there is a way to get IntelliJ to automatically pick it up
from reading the project files when IntelliJ first imports a project. If
so, that would be even better.

Please feel free to file a JIRA and submit a patch, or you can try
submitting a GitHub pull request against trunk for these changes. I am
experimenting with trying to accept PRs, so I wanted to try a few small
ones.

Thanks,
Mike

On Mon, Jul 18, 2016 at 6:33 AM, Denes Arvay <de...@cloudera.com> wrote:

> hm, I didn't know that it's not possible to send attachments to the list,
> sorry.
> You can check the diff here:
> https://gist.github.com/adenes/725c2afa87fc2029db6e7d91a7aa8c57
>
> On Mon, Jul 18, 2016 at 3:22 PM Denes Arvay <de...@cloudera.com> wrote:
>
> > Hi All,
> >
> > I was setting up the checkstyle plugin in IntelliJ (
> > https://plugins.jetbrains.com/plugin/1065) and it turned out that the
> > suppression file should be referenced from the checkstyle.xml to be used
> by
> > the plugin so I added it to the checkstyle config. Please check the
> > attached diff.
> >
> > Remarks: I wasn't able to configure it so that maven checkstyle plugin
> > could load the suppression file (the only way it worked was referring to
> it
> > with absolute path) so I marked it as optional and the maven plugin will
> > get the file's location from the configuration in the pom.xml.
> >
> > Please share your opinion whether it's a useful addition or not.
> >
> > I also created an IntelliJ code style definition xml based on the
> > checkstyle rules:
> > https://gist.github.com/adenes/bc848389c30b59eea400469a1d5e4b49
> >
> > Cheers,
> > Denes
> >
>

Re: [DISCUSS] Checkstyle maven plugin

Posted by Denes Arvay <de...@cloudera.com>.
hm, I didn't know that it's not possible to send attachments to the list,
sorry.
You can check the diff here:
https://gist.github.com/adenes/725c2afa87fc2029db6e7d91a7aa8c57

On Mon, Jul 18, 2016 at 3:22 PM Denes Arvay <de...@cloudera.com> wrote:

> Hi All,
>
> I was setting up the checkstyle plugin in IntelliJ (
> https://plugins.jetbrains.com/plugin/1065) and it turned out that the
> suppression file should be referenced from the checkstyle.xml to be used by
> the plugin so I added it to the checkstyle config. Please check the
> attached diff.
>
> Remarks: I wasn't able to configure it so that maven checkstyle plugin
> could load the suppression file (the only way it worked was referring to it
> with absolute path) so I marked it as optional and the maven plugin will
> get the file's location from the configuration in the pom.xml.
>
> Please share your opinion whether it's a useful addition or not.
>
> I also created an IntelliJ code style definition xml based on the
> checkstyle rules:
> https://gist.github.com/adenes/bc848389c30b59eea400469a1d5e4b49
>
> Cheers,
> Denes
>