Skip to content

Commit 131fde8

Browse files
authored
Create src.instructions.md with commenting rules (#2964)
This pull request adds a new instructions file that defines general rules for commenting code within the `src` directory. The file outlines best practices for writing comments, emphasizing that comments should not restate code and should only be used when the code cannot express the intent clearly. Documentation and code quality guidelines: * Added `.github/instructions/src.instructions.md` to specify general rules for code comments, including when to use comments and when to improve code to make comments unnecessary.
2 parents 5f7edda + a5b9825 commit 131fde8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
applyTo: "src/**"
3+
---
4+
5+
General rules that apply to all code.
6+
7+
Rules for commenting code:
8+
9+
1. Comments are for things that cannot be expressed as code
10+
2. Comments which restate code must be deleted
11+
3. If the omment says what the code could say, then the code must change to make the commnet redundant
12+
13+

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ jobs:
183183
- 'docs/**'
184184
automation:
185185
- 'build/**'
186-
- '.github/**'
186+
- '.github/workfows/**'
187187
- name: "Debug Filter Results"
188188
shell: pwsh
189189
run: |

0 commit comments

Comments
 (0)