formatter-maven-plugin formatter validate问题
运行mvn install的时候报以下格式错误:
Failed to execute goal net.revelc.code.formatter:formatter-maven-plugin:2.10.0:validate (default-cli) on project xxxx: File 'C:\Users\.......\xxxxxx.java' has not been previously formatted. Please format file and commit before running validation!
使用IDEA自带的代码格式化功能也无法解决,后找到可以使用maven命令可以帮忙解决。
mvn formatter:format
格式化成功后验证改动是否生效:
mvn formatter:validate