Skip to content

Commit 3862c0b

Browse files
T-GroCopilotBillWagner
authored
Update copilot-instructions with executable guidelines (#50067)
* Update copilot-instructions with executable guidelines Added instructions for encapsulating code in standalone executables and including PR commentary. * Apply suggestion from @Copilot Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Apply suggestion from @T-Gro * Update .github/copilot-instructions.md --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Bill Wagner <wiwagn@microsoft.com>
1 parent 626bcab commit 3862c0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/copilot-instructions.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ For snippets >6 lines:
4444
1. All code should use the latest stable versions/features.
4545
1. Create examples in both C# and Visual Basic unless the article referencing the snippet resides in the in the `csharp`, `fsharp`, and `visual-basic` language folders.
4646
1. When you add code, use code comments sparingly because they don't get localized. You can use them to briefly clarify code-specific details (such as logic, parameters, or edge cases). Put any critical information and context in the markdown text of the referencing article.
47+
1. IMPORTANT: For created code, always try to encapsulate it in an standalone executable (e.g. `dotnet fsi myFile.fsx` or `dotnet run myFile.cs`, add the necessary boilerplate/imports/usings where needed, and execute it.). Run it, and for every code snippet, include a PR commentary checking each code sample and proving what it has produced - this can be diagnostics, standard output, or a result value. That standalone file is just for the purpose of verification within copilot's execution environment, the published docs snippet should remain a subset as you would normally write to maximize clarity.
4748

4849
## File Naming
4950

@@ -69,4 +70,4 @@ When assigned an issue or directly given a task in GitHub:
6970
3. Check for build warnings in the OpenPublishing.Build status check
7071
4. If warnings exist:
7172
- Click "View Details" to open the build report
72-
- Resolve any build warnings you introduced
73+
- Resolve any build warnings you introduced

0 commit comments

Comments
 (0)