|
| 1 | +--- |
| 2 | +title: "IDE3000: Implement with Copilot" |
| 3 | +description: "Learn about code analysis rule IDE3000: Implement with Copilot." |
| 4 | +ms.date: 05/20/2025 |
| 5 | +f1_keywords: |
| 6 | +- IDE3000 |
| 7 | +helpviewer_keywords: |
| 8 | +- IDE3000 |
| 9 | +dev_langs: |
| 10 | +- CSharp |
| 11 | +ai-usage: ai-assisted |
| 12 | +--- |
| 13 | + |
| 14 | +# Implement with Copilot (IDE3000) |
| 15 | + |
| 16 | +| Property | Value | |
| 17 | +|--------------------------|-------------------------------| |
| 18 | +| **Rule ID** | IDE3000 | |
| 19 | +| **Title** | Implement with Copilot | |
| 20 | +| **Category** | CodeQuality | |
| 21 | +| **Subcategory** | Miscellaneous rules | |
| 22 | +| **Applicable languages** | C# | |
| 23 | + |
| 24 | +## Overview |
| 25 | + |
| 26 | +This rule identifies methods that contain a <xref:System.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. |
| 27 | + |
| 28 | +[!INCLUDE [enabled-on-build-never](../includes/enabled-on-build-never.md)] |
| 29 | + |
| 30 | +## Options |
| 31 | + |
| 32 | +This rule has no associated code-style options. |
| 33 | + |
| 34 | +## Example |
| 35 | + |
| 36 | +```csharp |
| 37 | +// Code with NotImplementedException |
| 38 | +public class Calculator |
| 39 | +{ |
| 40 | + public int Add(int a, int b) |
| 41 | + { |
| 42 | + // IDE3000: Implement with Copilot. |
| 43 | + throw new NotImplementedException(); |
| 44 | + } |
| 45 | +} |
| 46 | +``` |
| 47 | + |
| 48 | +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. |
| 49 | + |
| 50 | +## Suppress a warning |
| 51 | + |
| 52 | +If you want to suppress only a single violation, add preprocessor directives to your source file to disable and then re-enable the rule. |
| 53 | + |
| 54 | +```csharp |
| 55 | +#pragma warning disable IDE3000 |
| 56 | +// The code that's violating the rule is on this line. |
| 57 | +#pragma warning restore IDE3000 |
| 58 | +``` |
| 59 | + |
| 60 | +To disable the rule for a file, folder, or project, set its severity to `none` in the [configuration file](../configuration-files.md). |
| 61 | + |
| 62 | +```ini |
| 63 | +[*.{cs,vb}] |
| 64 | +dotnet_diagnostic.IDE3000.severity = none |
| 65 | +``` |
| 66 | + |
| 67 | +To disable all of the code-style rules, set the severity for the category `Style` to `none` in the [configuration file](../configuration-files.md). |
| 68 | + |
| 69 | +```ini |
| 70 | +[*.{cs,vb}] |
| 71 | +dotnet_analyzer_diagnostic.category-Style.severity = none |
| 72 | +``` |
| 73 | + |
| 74 | +For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). |
| 75 | + |
| 76 | +## See also |
| 77 | + |
| 78 | +- [Generate unit tests with GitHub Copilot](../../../core/testing/unit-testing-with-copilot.md) |
| 79 | +- [Code style rules reference](index.md) |
0 commit comments