-
Notifications
You must be signed in to change notification settings - Fork 6k
Add docs for IDE3000 #46275
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Add docs for IDE3000 #46275
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
c66fbb3
Initial plan for issue
Copilot e396a0d
Add documentation for IDE3000 (Implement method with Copilot)
Copilot 6946dc4
Fix IDE3000 position in index.md
Copilot c1ff35d
add to TOC, other mods
gewarren 70f83b9
tweak
gewarren 545b984
respond to feedback
gewarren 3682d82
add metadata
gewarren 064186b
Merge branch 'main' into fix-45530
gewarren File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
docs/fundamentals/code-analysis/includes/enabled-on-build-never.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
> [!NOTE] | ||
> Even if you [enable code style rules on build](../overview.md#enable-on-build), this rule is not enabled. It only surfaces in the Visual Studio editor. | ||
> Even if you [enable code style rules on build](../overview.md#enable-on-build), this rule is not enabled. It only surfaces in the IDE. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
--- | ||
title: "IDE3000: Implement with Copilot" | ||
description: "Learn about code analysis rule IDE3000: Implement with Copilot." | ||
ms.date: 05/20/2025 | ||
f1_keywords: | ||
- IDE3000 | ||
helpviewer_keywords: | ||
- IDE3000 | ||
dev_langs: | ||
- CSharp | ||
ai-usage: ai-assisted | ||
--- | ||
|
||
# Implement with Copilot (IDE3000) | ||
|
||
| 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 <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. | ||
|
||
[!INCLUDE [enabled-on-build-never](../includes/enabled-on-build-never.md)] | ||
|
||
## Options | ||
|
||
This rule has no associated code-style options. | ||
|
||
## Example | ||
|
||
```csharp | ||
// 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. | ||
|
||
```csharp | ||
#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](../configuration-files.md). | ||
|
||
```ini | ||
[*.{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](../configuration-files.md). | ||
|
||
```ini | ||
[*.{cs,vb}] | ||
dotnet_analyzer_diagnostic.category-Style.severity = none | ||
``` | ||
|
||
For more information, see [How to suppress code analysis warnings](../suppress-warnings.md). | ||
|
||
## See also | ||
|
||
- [Generate unit tests with GitHub Copilot](../../../core/testing/unit-testing-with-copilot.md) | ||
- [Code style rules reference](index.md) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.