SonarQube
  1. SonarQube
  2. SONAR-1319

Checkstyle rules : 'Header' and 'RegexpHeader' are not available in Sonar

    Details

    • Type: Improvement Improvement
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      1

      Description

      Those two rules just need to be added to the Sonar rules repository.

        Activity

        Hide
        Simon Brandhof added a comment -

        The rule Header should be activated on the profile "sonar on sonar" on nemo, in order to check the license/copyright header. The parameter "header" has the following value :

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

        Show
        Simon Brandhof added a comment - The rule Header should be activated on the profile "sonar on sonar" on nemo, in order to check the license/copyright header. The parameter "header" has the following value : /*\n * Sonar, open source software quality management tool.\n * Copyright (C) 2009 SonarSource SA\n * contact AT sonarsource DOT com\n *\n * Sonar is free software; you can redistribute it and/or\n * modify it under the terms of the GNU Lesser General Public\n * License as published by the Free Software Foundation; either\n * version 3 of the License, or (at your option) any later version.\n *\n * Sonar is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU\n * Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public\n * License along with Sonar; if not, write to the Free Software\n * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02\n */
        Hide
        Olivier Gaudin added a comment -

        with a high priority...

        Show
        Olivier Gaudin added a comment - with a high priority...
        Hide
        Freddy Mallet added a comment -

        Looks like there is no way to specify a header with carriage return characters as those characters are ignored by Sonar. see screenshot.

        Show
        Freddy Mallet added a comment - Looks like there is no way to specify a header with carriage return characters as those characters are ignored by Sonar. see screenshot.
        Hide
        Freddy Mallet added a comment -

        Ok, I didn't read the tip :

        the required header specified inline. Individual header lines must be separated by the string "\n" (even on platforms with a different line separator)

        Show
        Freddy Mallet added a comment - Ok, I didn't read the tip : the required header specified inline. Individual header lines must be separated by the string "\n" (even on platforms with a different line separator)

          People

          • Assignee:
            Freddy Mallet
            Reporter:
            Freddy Mallet
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: