从8.2升级到8.23之后,我在许可证标头中的URL之前和之后都缺少<p>
标签的冲突
/**
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version
* 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package bla;
import blu;
public class Bli {
无需更改代码。
我不确定违规行为是否正确,即该规则是否应应用于package
以上的文字还是错误。
如果不是错误,我打算建议和选择,以便更轻松地进行此检查。
我正在通过Maven 3.6.0和maven-checkstyle-plugin
3.1.0使用Checkstyle。
最简单的方法是将许可证标头中的/** */
更改为/* */
,但我不想为升级工具版本而提出建议并进行更改。
答案 0 :(得分:1)
如果注释具有javadoc标识符,则checkstyle对其应用所有规则。违反有效。
如果您不想更改标题格式,请使用抑制https://checkstyle.org/config_filters.html