简体   繁体   中英

Is it possible to define a code style in checkstyle based on a code style from IntelliJ idea?

I have a project which I'm developing in IntelliJ Idea and I have formatting rules like where curly braces are to be located and so on. Is it possible to convert an IntelliJ code style into a checkstyle one so that when I run reports through Maven, I don't see warnings like "Right curly brace and next "else", "catch" and "finally" keywords should be located on the same line"...?

Thanks in advance!

Answer for your question is a maven-checkstyle-plugin.

http://maven.apache.org/plugins/maven-checkstyle-plugin/

But before using, you need to understand that maven is a separate application is not fully integrated with the idea. ie this plugin will not use the idea of ​​setting, but it will have to use a separate files configuration.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM