Uploaded image for project: 'Rules Repository'
  1. Rules Repository
  2. RSPEC-1451

Track lack of copyright and license headers

    Details

    • Type: Finding Detection
    • Status: Active
    • Resolution: Unresolved
    • Labels:
      None
    • Message:
      Add or update the header of this file.
    • List of parameters:
      Hide
      • Key: headerFormat
        • Description: Expected copyright and license header
        • Type = TEXT
      • key: isRegularExpression
        • description: Whether the headerFormat is a regular expression
        • default: false
      Show
      Key: headerFormat Description: Expected copyright and license header Type = TEXT key: isRegularExpression description: Whether the headerFormat is a regular expression default: false
    • Default Severity:
      Blocker
    • Impact:
      High
    • Likelihood:
      High
    • Legacy Key:
      COBOL.HeaderCheck
    • Targeted languages:
      ABAP, PL/I, Python, VB6
    • Covered Languages:
      C#, C, C++, Cobol, Flex, Go, HTML, Java, JavaScript, Kotlin, Objective-C, PHP, PL/SQL, RPG, Ruby, Scala, Swift, T-SQL, TypeScript, VB.Net
    • Irrelevant for Languages:
      XML
    • Remediation Function:
      Constant/Issue
    • Constant Cost:
      5min
    • Analysis Level:
      Syntactic Analysis
    • Analysis Scope:
      Main Sources, Test Sources
    • Common Rule:
      Yes
    • Checkstyle:
      Header, RegexpHeader
    • SwiftLint:
      file_header
    • TSLint:
      file-header

      Description

      Each source file should start with a header stating file ownership and the license which must be used to distribute the application.
      This rule must be fed with the header text that is expected at the beginning of every file.

      Compliant Solution

      /*
       * 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.
       */
      

        Attachments

          Issue Links

          1.
          RPG RSPEC-2021 Language-Specification Active Unassigned
          2.
          Web RSPEC-3245 Language-Specification Active Unassigned
          3.
          Cobol RSPEC-3721 Language-Specification Active Unassigned
          4.
          C# RSPEC-3961 Language-Specification Active Unassigned
          5.
          Ruby RSPEC-4744 Language-Specification Active Unassigned
          6.
          T-SQL RSPEC-4816 Language-Specification Active Unassigned
          7.
          VB.NET RSPEC-4874 Language-Specification Active Unassigned
          8.
          PL/SQL RSPEC-5210 Language-Specification Active Unassigned

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                freddy.mallet Freddy Mallet (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: