IntelliJ IDEA code format from checkstyle configuration

前端 未结 3 2128
面向向阳花
面向向阳花 2020-11-28 08:22

I\'ve decided to contribute to android maven plugin.

They use quite specific code style format. It will take some time for me to modify IDEA code format rules to sa

3条回答
  •  爱一瞬间的悲伤
    2020-11-28 09:05

    finally there is something:

    checkstyle-IDEA since 4.24.0 features import of checkstyle config.

    A solution is available now:

    1. Please install CheckStyle-IDEA plugin (http://plugins.jetbrains.com/plugin/1065?pr=idea), it can be found via plug-in repository (Settings|Plugins|Browse repositories).

    2. Go to Settings|Editor|Code Style, choose a code style you want to import CheckStyle configuration to.

    3. Click Manage...|Import.., choose "CheckStyle Configuration" and select a corresponding CheckStyle configuration file. Click OK.

    At the end you will see a message "CheckStyle configuration settings were imported to ... scheme".

    If you encounter any problems, you can create a new issue for the CheckStyle plug-in here: https://github.com/jshiell/checkstyle-idea/issues. This issue is actually a duplicate of https://github.com/jshiell/checkstyle-idea/issues/126.

    CheckStyle plug-in version where the feature is available is 4.24.0

    Copied from https://youtrack.jetbrains.com/issue/IDEA-61520#comment=27-1292600

提交回复
热议问题