Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-2067

S793: Fix false-positives by Whitelisting the usage of "#pragma once" from this rule

    Details

    • Type: False-Positive
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.0
    • Fix Version/s: 6.7
    • Component/s: C, C++, Objective-C, Rules
    • Labels:
      None

      Description

      RSPEC-793 (which is inspired from Misra) demand documentation (in an unspecified way) for all #pragma used, especially for better portability.

      However, #pragma once is pretty well portable across a wide range of compilers, is self documented and has become a de-facto standard. In order to kill the noise, we should therefore whitelist it from this rule.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                geoffray.adde Geoffray Adde
                Reporter:
                loic.joly Loïc Joly
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: