Skip to content

Commit 9721182

Browse files
authored
Merge pull request github#5080 from github/RasmusWL/naming-for-acronyms
Update CodeQL Style guide to mention acronyms
2 parents dae65f6 + 779a464 commit 9721182

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

docs/ql-style-guide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,7 @@ private predicate foo(Expr e, Expr p) {
173173
1. Use [camelCase](https://en.wikipedia.org/wiki/Camel_case) for:
174174
- Predicate names
175175
- Variable names
176+
1. Acronyms *should* use normal PascalCase/camelCase (as an exception, if there are only two letters then using all uppercase letters is acceptable).
176177
1. Newtype predicate names *should* begin with `T`.
177178
1. Predicates that have a result *should* be named `get...`
178179
1. Predicates that can return multiple results *should* be named `getA...` or `getAn...`
@@ -183,6 +184,7 @@ private predicate foo(Expr e, Expr p) {
183184
1. Use names as they are used in the target-language specification.
184185
1. Use American English.
185186

187+
186188
### Examples
187189

188190
```ql
@@ -209,6 +211,9 @@ class Type extends ... {
209211
210212
/** ... */
211213
Type getATypeParameter() { ... }
214+
215+
/** Gets the SSA variable ... */
216+
predicate getSsaVariable() { ... }
212217
}
213218
```
214219

0 commit comments

Comments
 (0)