with one click
rcs-warnings
Roslynator RCS analyzer warning meanings and examples
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Menu
Roslynator RCS analyzer warning meanings and examples
Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
Based on SOC occupation classification
| name | rcs-warnings |
| description | Roslynator RCS analyzer warning meanings and examples |
Use this skill when the build reports an RCS* diagnostic from Roslynator analyzers.
RCS0003 - Add blank line after using directive listWhat it flags: Roslynator reports code that violates this rule: Add blank line after using directive list.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0003
Example:
using System; is followed immediately by namespace App;.RCS0041 - Remove new line between 'if' keyword and 'else' keywordWhat it flags: Roslynator reports code that violates this rule: Remove new line between 'if' keyword and 'else' keyword.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0041
Example:
} and else are separated by an extra newline.else directly after the closing brace according to project style.RCS0044 - Use carriage return + linefeed as new lineWhat it flags: Roslynator reports code that violates this rule: Use carriage return + linefeed as new line.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0044
Example:
RCS0046 - Use spaces instead of tabWhat it flags: Roslynator reports code that violates this rule: Use spaces instead of tab.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0046
Example:
RCS0058 - Normalize whitespace at the end of a fileWhat it flags: Roslynator reports code that violates this rule: Normalize whitespace at the end of a file.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0058
Example:
RCS0063 - Remove unnecessary blank lineWhat it flags: Roslynator reports code that violates this rule: Remove unnecessary blank line.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS0063
Example:
RCS1001 - Add braces (when expression spans over multiple lines)What it flags: Roslynator reports code that violates this rule: Add braces (when expression spans over multiple lines).
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1001
Example:
if body is written without braces.RCS1003 - Add braces to if-else (when expression spans over multiple lines)What it flags: Roslynator reports code that violates this rule: Add braces to if-else (when expression spans over multiple lines).
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1003
Example:
if/else branches omit braces.RCS1013 - Use predefined typeWhat it flags: Roslynator reports code that violates this rule: Use predefined type.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1013
Example:
System.String value in C# code.string, int, and bool.RCS1016 - Use block body or expression bodyWhat it flags: Roslynator reports code that violates this rule: Use block body or expression body.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1016
Example:
RCS1019 - Order modifiersWhat it flags: Roslynator reports code that violates this rule: Order modifiers.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1019
Example:
static public.public static.RCS1034 - Remove redundant 'sealed' modifierWhat it flags: Roslynator reports code that violates this rule: Remove redundant 'sealed' modifier.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1034
Example:
sealed modifier is present.sealed where Roslynator reports it redundant.RCS1035 - Remove redundant comma in initializerWhat it flags: Roslynator reports code that violates this rule: Remove redundant comma in initializer.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1035
Example:
new[] { 1, 2, } where style disallows the comma.RCS1037 - Remove trailing white-spaceWhat it flags: Roslynator reports code that violates this rule: Remove trailing white-space.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1037
Example:
RCS1038 - Remove empty statementWhat it flags: Roslynator reports code that violates this rule: Remove empty statement.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1038
Example:
; creates an empty statement.RCS1039 - Remove argument list from attributeWhat it flags: Roslynator reports code that violates this rule: Remove argument list from attribute.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1039
Example:
[Obsolete()] when no arguments are supplied.[Obsolete].RCS1044 - Remove original exception from throw statementWhat it flags: Roslynator reports code that violates this rule: Remove original exception from throw statement.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1044
Example:
catch (Exception ex) { throw ex; }.throw; to preserve the stack trace.RCS1047 - Non-asynchronous method name should not end with 'Async'What it flags: Roslynator reports code that violates this rule: Non-asynchronous method name should not end with 'Async'.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1047
Example:
public void SaveAsync() returns void.Task or rename the method.RCS1055 - Unnecessary semicolon at the end of declarationWhat it flags: Roslynator reports code that violates this rule: Unnecessary semicolon at the end of declaration.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1055
Example:
public string Name { get; set; };.RCS1059 - Avoid locking on publicly accessible instanceWhat it flags: Roslynator reports code that violates this rule: Avoid locking on publicly accessible instance.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1059
Example:
lock (this) or lock (typeof(Foo)).RCS1060 - Declare each type in separate fileWhat it flags: Roslynator reports code that violates this rule: Declare each type in separate file.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1060
Example:
RCS1075 - Avoid empty catch clause that catches System. ExceptionWhat it flags: Roslynator reports code that violates this rule: Avoid empty catch clause that catches System. Exception.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1075
Example:
catch (Exception) { }.RCS1091 - Remove empty regionWhat it flags: Roslynator reports code that violates this rule: Remove empty region.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1091
Example:
#region Old code contains no members.RCS1093 - File contains no codeWhat it flags: Roslynator reports code that violates this rule: File contains no code.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1093
Example:
.cs file contains only comments or whitespace.RCS1094 - Declare using directive on top levelWhat it flags: Roslynator reports code that violates this rule: Declare using directive on top level.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1094
Example:
using System; is inside a namespace when top-level usings are expected.RCS1102 - Make class staticWhat it flags: Roslynator reports code that violates this rule: Make class static.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1102
Example:
static.RCS1110 - Declare type inside namespaceWhat it flags: Roslynator reports code that violates this rule: Declare type inside namespace.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1110
Example:
RCS1145 - Remove redundant 'as' operatorWhat it flags: Roslynator reports code that violates this rule: Remove redundant 'as' operator.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1145
Example:
var text = value as string; where value is already string.as conversion.RCS1172 - Use 'is' operator instead of 'as' operatorWhat it flags: Roslynator reports code that violates this rule: Use 'is' operator instead of 'as' operator.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1172
Example:
var c = o as Control; if (c != null) ....if (o is Control c) ....RCS1211 - Remove unnecessary 'else'What it flags: Roslynator reports code that violates this rule: Remove unnecessary 'else'.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1211
Example:
if (done) { return; } else { Work(); }.else.RCS1225 - Make class sealedWhat it flags: Roslynator reports code that violates this rule: Make class sealed.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1225
Example:
sealed when appropriate.RCS1242 - Do not pass non-read-only struct by read-only referenceWhat it flags: Roslynator reports code that violates this rule: Do not pass non-read-only struct by read-only reference.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1242
Example:
void M(in MutableStruct value) for a non-readonly struct.RCS1259 - Remove empty syntaxWhat it flags: Roslynator reports code that violates this rule: Remove empty syntax.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1259
Example:
RCS1260 - Add/remove trailing commaWhat it flags: Roslynator reports code that violates this rule: Add/remove trailing comma.
Documentation: https://josefpihrt.github.io/docs/roslynator/analyzers/RCS1260
Example:
Inspect, unpack, edit, sign, and repack Ren'Py save files. Use when working with Ren'Py .save archives, save metadata JSON, screenshot/extra_info/log/signatures entries, machine save-token keys, or when a user asks to modify or repair a Ren'Py savegame.
correct modelling of C# datastructures for maintainable code
Correctly call native (C/C++) libraries from .NET using P/Invoke and LibraryImport. Covers function signatures, string marshalling, memory lifetime, SafeHandle, and cross-platform patterns. USE FOR: writing new P/Invoke or LibraryImport declarations, reviewing or debugging existing native interop code, wrapping a C or C++ library for use in .NET, diagnosing crashes, memory leaks, or corruption at the managed/native boundary. DO NOT USE FOR: COM interop, C++/CLI mixed-mode assemblies, or pure managed code with no native dependencies.
Guides activity tracing with generated ActivitySources, tags, parent activities, exception status handling, and registration. Use when adding or reviewing OpenTelemetry activity tracing in Bendex flows.
Microsoft code analysis CA warning meanings and examples
Routing guide for enabled compiler and analyzer warnings in this Bendex solution