Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Property | Value |
---|---|
Rule ID | IDE3000 |
Title | Implement with Copilot |
Category | CodeQuality |
Subcategory | Miscellaneous rules |
Applicable languages | C# |
Overview
This rule identifies methods that contain a NotImplementedException and provides a light bulb suggestion to implement the method using GitHub Copilot. When you use this code fix, GitHub Copilot generates an implementation for the method based on its signature, type context, and other available information.
Note
Even if you enable code style rules on build, this rule is not enabled. It only surfaces in the IDE.
Options
This rule has no associated code-style options.
Example
// Code with NotImplementedException
public class Calculator
{
public int Add(int a, int b)
{
// IDE3000: Implement with Copilot.
throw new NotImplementedException();
}
}
When you click on the light bulb suggestion, select the Implement with Copilot option to prompt GitHub Copilot to generate an implementation for the method.
Suppress a warning
If you want to suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the rule.
#pragma warning disable IDE3000
// The code that's violating the rule is on this line.
#pragma warning restore IDE3000
To disable the rule for a file, folder, or project, set its severity to none
in the configuration file.
[*.{cs,vb}]
dotnet_diagnostic.IDE3000.severity = none
To disable all of the code-style rules, set the severity for the category Style
to none
in the configuration file.
[*.{cs,vb}]
dotnet_analyzer_diagnostic.category-Style.severity = none
For more information, see How to suppress code analysis warnings.