idea、maven插件

spotless-maven-plugin

  • 官方文档:https://github.com/diffplug/spotless/blob/main/plugin-maven/README.md
  • 功能特性:
    • 检查代码格式;
    • 根据规则自动修改不复合规范的代码格式;
    • 开发过程中引入该插件时,可以只对最新提交的源文件进行格式检查和修改,不影响已提交的大量源文件(检查、修改之前的源文件会影响代码记录回溯)。相关配置参考:https://github.com/diffplug/spotless/blob/main/plugin-maven/README.md#ratchet
    • 支持多种语言;
  • 可能会遇到的问题:
    • GoogleJavaformat版本和JDK版本兼容
      • 解决办法:The version 1.7 of GoogleJavaformat can work well on JDK1.8
        
            com.diffplug.spotless
            spotless-maven-plugin
            2.2.4
            
                
                    
                        1.7
                        
                    
                    
                
            
            
                
                    spotless-check
                    validate
                    
                        check
                    
                
            
        

         

Save Actions

  • 官方文档:https://github.com/dubreuia/intellij-plugin-save-actions,包含特性、安装、使用;

你可能感兴趣的:(基础知识)