Skip to main content

RCS1018: Add/remove accessibility modifiers

Properties

PropertyValue
Default Severitydisabled by default
Minimum language version-

Examples

Example #1

diagnostic.cs
class Foo
{
void Bar()
{
}
}
fix.cs
internal class Foo
{
private void Bar()
{
}
}

Configuration

info

Option roslynator_accessibility_modifiers is required to be set for this analyzer to work.

.editorconfig
# Prefer explicit/implicit accessibility modifiers
roslynator_accessibility_modifiers = explicit|implicit

Applies to