Skip to content

Commit 9f2d89c

Browse files
authored
Update ql-style-guide.md
Our [QLDoc style guide](https://github.com/github/codeql/blob/main/docs/qldoc-style-guide.md#predicates-with-result) says that we should avoid any use of `return`, so it would be smart to also do so in our own style guide for predicate names 😊
1 parent 67b6a82 commit 9f2d89c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

docs/ql-style-guide.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private predicate foo(Expr e, Expr p) {
176176
1. Acronyms *should* use normal PascalCase/camelCase. However, two-letter acronyms should have both letters capitalized.
177177
1. Newtype predicate names *should* begin with `T`.
178178
1. Predicates that have a result *should* be named `get...`
179-
1. Predicates that can return multiple results *should* be named `getA...` or `getAn...`
179+
1. Predicates that can have multiple results *should* be named `getA...` or `getAn...`
180180
1. Predicates that don't have a result or parameters *should* be named `is...` or `has...`
181181
1. *Avoid* underscores in names.
182182
1. *Avoid* short or single-letter names for classes, predicates and fields.
@@ -304,6 +304,7 @@ For more information about documenting the code that you contribute to this repo
304304
exists(Type arg | arg = this.getAChild() | arg instanceof TypeParameter)
305305
```
306306

307+
307308
```ql
308309
exists(Type qualifierType |
309310
this.hasNonExactQualifierType(qualifierType)

0 commit comments

Comments
 (0)