如何解决"添加或更新此文件的标题。" SonarQube的代码味道?

时间:2018-04-13 08:55:22

标签: 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.
 */

但它没有修复代码味道。能否请给我一个可以解决这个问题的工作简单示例?

1 个答案:

答案 0 :(得分:1)

将此规则添加到应用于项目的配置文件时,将使用预期标头进行配置。您不应该检查"合规解决方案"但是那种配置可以看到预期的结果。

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