Add new instruction on commenting for self-explanatory code with less comments#93
Merged
aaronpowell merged 1 commit intoJul 13, 2025
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
Adds a new Copilot instruction file to guide self-explanatory code commenting and updates the README to include it.
- Introduces
self-explanatory-code-commenting.instructions.mdwith guidelines on writing minimal yet meaningful comments. - Updates
README.mdto list and link the new instruction file.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| instructions/self-explanatory-code-commenting.instructions.md | New instruction file defining commenting guidelines |
| README.md | Added entry for the self-explanatory code commenting instructions |
| @@ -0,0 +1,162 @@ | |||
| --- | |||
| description: 'Guidelines for GitHub Copilot to write comments to achieve self-explanatory code with less comments. Examples are in JavaScript but it should work on any language that has comments.' | |||
| applyTo: "**" | |||
There was a problem hiding this comment.
Wrap the applyTo value in single quotes (e.g., applyTo: '**') to comply with front matter quoting guidelines.
Contributor
Author
There was a problem hiding this comment.
I updated the code to use single quotes.
406f762 to
f2db3cb
Compare
aaronpowell
approved these changes
Jul 13, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request Checklist
node update-readme.jsand verified thatREADME.mdis up to date.Description
Added a new instruction on commenting for projects that prefer less comments with self-explanatory code. With this instruction, Copilot writes less comments avoiding redundant ones but still comments important and meaningful ones.
Although the contributing guideline says Keep it focused with technology or framework which I definitely agree to, since this instruction is about commenting, I did not really specify any language or framework except examples in the instruction are written in JavaScript but I believe it could be used for lots of different languages.
Type of Contribution
Additional Notes
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.