如何解决“添加或更新此文件的标头”。SonarQube 中的代码气味?

Gio*_*nno 8 sonarqube

我什至尝试过“合规解决方案”:

/*
 * SonarQube, open source software quality management tool.
 * Copyright (C) 2008-2013 SonarSource
 * mailto:contact AT sonarsource DOT com
 *
 * SonarQube is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or (at your option) any later version.
 *
 * SonarQube is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software Foundation,
 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */
Run Code Online (Sandbox Code Playgroud)

但它并没有修复代码气味。您能给我一个可以解决这个问题的最简单的例子吗?

G. *_*eam 3

当此规则添加到应用于您的项目的配置文件时,将使用预期的标头进行配置。您不应该检查“合规解决方案”,而应该检查该配置以了解预期内容。

请注意,标头可以配置为正则表达式。通常,这用于处理版权年份变化,但您应该仔细检查它是否也被用作正则表达式。