Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0ea7aa5

Browse files
authored
Update CodeQL Style guide to mention acronyms
Adding this after asking how to do this internally. Is based on https://dart.dev/guides/language/effective-dart/style#do-capitalize-acronyms-and-abbreviations-longer-than-two-letters-like-words
1 parent a45c415 commit 0ea7aa5

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

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. Abbreviations and acronyms *should* use normal PascalCase/camelCase (if there are only two letters, it is generally ok to use all uppercase letters).
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+
/** ... */
216+
predicate getHttpConnection() { ... }
212217
}
213218
```
214219

0 commit comments

Comments
 (0)