You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<name>C4698: 'feature' is for evaluation purposes only and is subject to change or removal in future updates</name>
5070
+
<description>
5071
+
<![CDATA[
5072
+
<p>WinRT APIs that are released for experimentation and feedback are decorated with the <code>Windows.Foundation.Metadata.ExperimentalAttribute</code> attribute. In Visual Studio 2017 version 15.3, the compiler produces warning C4698 for this attribute. A few APIs in previous versions of the Windows SDK have already been decorated with the attribute, and calls to these APIs now trigger this compiler warning. Newer Windows SDKs have the attribute removed from all shipped types. If you're using an older SDK, you'll need to suppress these warnings for all calls to shipped types.</p>
<name>C4768: __declspec attributes before linkage specification are ignored</name>
5463
+
<description>
5464
+
<![CDATA[
5465
+
<p>The compiler warns if <code>__declspec(...)</code> is applied before the <code>extern "C"</code> linkage specification. Previously, the compiler would ignore the attribute, which could have runtime implications.</p>
<name>C4834: discarding return value of function with 'nodiscard' attribute</name>
5749
+
<description>
5750
+
<![CDATA[
5751
+
<p>Starting in the C++17 Standard, the <code>[[nodiscard]]</code> attribute specifies that a function's return value isn't intended to be discarded. If a caller discards the return value, the compiler generates warning C4834.</p>
<name>C4841: non-standard extension used: compound member designator used in offsetof</name>
5804
+
<description>
5805
+
<![CDATA[
5806
+
<p>If you use <code>offsetof(T, m)</code>, where <em><code>m</code></em> is a compound member designator, the compiler generates a warning when you compile with the <strong><code>/Wall</code></strong> option.</p>
<name>C4843: 'type1': An exception handler of reference to array or function type is unreachable, use 'type2' instead</name>
5815
+
<description>
5816
+
<![CDATA[
5817
+
<p>Handlers of reference to array or function type are never a match for any exception object. Starting in Visual Studio 2017 version 15.5, the compiler honors this rule and raises a level 4 warning. It also no longer matches a handler of <code>char*</code> or <code>wchar_t*</code> to a string literal when <strong><code>/Zc:strictStrings</code></strong> is used.</p>
<name>C5037: 'member-function': an out-of-line definition of a member of a class template cannot have default arguments</name>
6398
+
<description>
6399
+
<![CDATA[
6400
+
<p>Default arguments aren't allowed on out-of-line definitions of member functions in template classes. The compiler issues a level 3 warning under <strong><code>/permissive</code></strong>, and an error under <a data-linktype="relative-path" href="https://docs.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-160"><code>/permissive-</code></a>.</p>
<name>C5038: data member 'member1' will be initialized after data member 'member2'</name>
6332
6409
<description>
6333
6410
<![CDATA[
6334
-
<p>Class members are initialized in the order they're declared, not the order they appear in initializer lists. This warning indicates the order of initialization isn't the same as the declaration order of data members or base classes. This order can lead to undefined runtime behavior, if the initialization of one member in the list depends on the initialization of a member that's declared later.</p>
6411
+
<p>Class members get initialized in the order they're declared, not the order they appear in initializer lists. The compiler warns when the initialization order isn't the same as the declaration order of data members or base classes. The order can lead to undefined runtime behavior: for example, if the initialization of one member in the list depends on the initialization of a member that's declared later.</p>
<name>C5050: Possible incompatible environment while importing module 'module_name'</name>
6442
+
<description>
6443
+
<![CDATA[
6444
+
<p>The compiler raises C5050 whenever the command-line options for modules aren't consistent between the module creation and module consumption sides.</p>
<name>C5243: 'type': using incomplete class 'class-name' can cause ODR violation due to ABI limitation</name>
6475
+
<description>
6476
+
<![CDATA[
6477
+
<p>The Microsoft C++ ABI in Visual Studio 2019 and earlier versions uses more than one kind of pointer-to-member type. These types have different sizes that depend on the inheritance model used by the class. The C++ standard allows you to declare a pointer-to-member of an incomplete class type. If you declare a variable of pointer-to-member type for an incomplete class, the compiler must use the most general representation. It can lead to a <em>one definition rule</em>, or ODR violation, since the compiler may use a smaller, more specific representation for this pointer-to-member type in other translation units where the complete class type is available.</p>
<name>C5247: section 'section-name' is reserved for C++ dynamic initialization</name>
6486
+
<description>
6487
+
<![CDATA[
6488
+
<p>The Microsoft C++ compiler uses reserved section names for internal implementation of features such as C++ dynamic initialization. If your code creates a section with the same name as a reserved section, such as <code>.CRT$XCU</code>, it interferes with the compiler. It may prevent other dynamic initialization and cause undefined behavior.</p>
<name>C5248: section 'section-name' is reserved for C++ dynamic initialization</name>
6497
+
<description>
6498
+
<![CDATA[
6499
+
<p>The Microsoft C++ compiler uses reserved section names for internal implementation of features such as C++ dynamic initialization. If your code inserts a variable in a reserved section, such as <code>.CRT$XCU</code>, it interferes with the compiler. Your variable isn't considered a C++ dynamic initializer. Also, its relative initialization order compared to compiler generated dynamic initializers isn't specified.</p>
<p>This check is intended to help reduce the visibility of certain symbols and to modularize the code. In multi-file C++ projects, each declaration should be either local to a C++ file (part of the anonymous namespace) or declared in a common header file that's included by multiple C++ files.</p>
<name>C6400: Using <function name> to perform a case-insensitive compare to constant string <string name></name>
@@ -8696,7 +8830,7 @@ Deleting such a pointer may lead to immediate memory corruption due to double de
8696
8830
<name>C26409: Avoid calling new and delete explicitly, use std::make_unique<T> instead (r.11)</name>
8697
8831
<description>
8698
8832
<![CDATA[
8699
-
<p>Even if code is clean of calls to<code>malloc()</code> and <code>free()</code>, we still suggest that you consider better options than explicit use of operators <a data-linktype="relative-path" href="https://docs.microsoft.com/en-us/cpp/cpp/new-and-delete-operators?view=msvc-160"><code>new</code> and <code>delete</code></a>.</p>
8833
+
<p>Even if code is clean of calls to<code>malloc</code> and <code>free</code>, we still suggest that you consider better options than explicit use of operators <a data-linktype="relative-path" href="https://docs.microsoft.com/en-us/cpp/cpp/new-and-delete-operators?view=msvc-160"><code>new</code> and <code>delete</code></a>.</p>
@@ -9155,6 +9289,18 @@ C4293 is a similar check in the Microsoft C++ compiler.</p>
9155
9289
</description>
9156
9290
<tag>core-guideline</tag>
9157
9291
<severity>INFO</severity>
9292
+
</rule>
9293
+
<rule>
9294
+
<key>C26457</key>
9295
+
<name>C26457: Never cast to (void) to ignore a [[nodiscard]] return value</name>
9296
+
<description>
9297
+
<![CDATA[
9298
+
<p>Excerpt from the <a data-linktype="external" href="https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#es48-avoid-casts">C++ Core Guideline for this warning</a>:</p>
rule_name='Rule template for Visual Studio custom rules'
359
364
rule_severity='MAJOR'
360
365
# pylint: disable=line-too-long
361
-
rule_description="""<p>Follow these steps to make your custom Custom rules available in SonarQube:</p>
366
+
rule_description="""<p>Follow these steps to make your custom rules available in SonarQube:</p>
362
367
<ol>
363
368
<ol>
364
369
<li>Create a new rule in SonarQube by "copying" this rule template and specify the <code>CheckId</code> of your custom rule, a title, a description, and a default severity.</li>
0 commit comments