Skip to content

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 8 commits into from
May 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
79 changes: 79 additions & 0 deletions docs/fundamentals/code-analysis/style-rules/ide3000.md
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)
3 changes: 2 additions & 1 deletion docs/fundamentals/code-analysis/style-rules/index.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Code-style rules overview
description: Learn about the different .NET code-style rules and categories.
ms.date: 03/25/2025
ms.date: 05/20/2025
author: gewarren
ms.author: gewarren
---
Expand Down Expand Up @@ -148,6 +148,7 @@ The following table list all the code-style rules by ID and [options](../code-st
> | [IDE0350](ide0350.md) | Use implicitly typed lambda | [csharp_style_prefer_implicitly_typed_lambda_expression](ide0350.md#csharp_style_prefer_implicitly_typed_lambda_expression) |
> | [IDE1005](ide1005.md) | Use conditional delegate call | [csharp_style_conditional_delegate_call](ide1005.md#csharp_style_conditional_delegate_call) |
> | [IDE1006](naming-rules.md) | Naming styles | |
> | [IDE3000](ide3000.md) | Implement with Copilot | |

> [!NOTE]
> There are some rules that only surface in the Visual Studio IDE, and these regard JSON and regular expression pattern strings. For more information, see [JSON001](/visualstudio/ide/reference/json001), [JSON002](/visualstudio/ide/reference/json002), and [RE0001](/visualstudio/ide/reference/re0001).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ This section contains code-style rules that don't fit in any other category. The

- [Remove invalid global 'SuppressMessageAttribute' (IDE0076)](ide0076.md)
- [Avoid legacy format target in global 'SuppressMessageAttribute' (IDE0077)](ide0077.md)
- [Implement with Copilot (IDE3000)](ide3000.md)

## See also

Expand Down
2 changes: 2 additions & 0 deletions docs/navigate/tools-diagnostics/toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1697,6 +1697,8 @@ items:
href: ../../fundamentals/code-analysis/style-rules/ide0076.md
- name: IDE0077
href: ../../fundamentals/code-analysis/style-rules/ide0077.md
- name: IDE3000
href: ../../fundamentals/code-analysis/style-rules/ide3000.md
- name: Formatting rules
items:
- name: IDE0055
Expand Down