зеркало из https://github.com/github/codeql.git
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 😊
This commit is contained in:
Родитель
67b6a82cf1
Коммит
9f2d89c903
|
@ -176,7 +176,7 @@ private predicate foo(Expr e, Expr p) {
|
|||
1. Acronyms *should* use normal PascalCase/camelCase. However, two-letter acronyms should have both letters capitalized.
|
||||
1. Newtype predicate names *should* begin with `T`.
|
||||
1. Predicates that have a result *should* be named `get...`
|
||||
1. Predicates that can return multiple results *should* be named `getA...` or `getAn...`
|
||||
1. Predicates that can have multiple results *should* be named `getA...` or `getAn...`
|
||||
1. Predicates that don't have a result or parameters *should* be named `is...` or `has...`
|
||||
1. *Avoid* underscores in names.
|
||||
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
|
|||
exists(Type arg | arg = this.getAChild() | arg instanceof TypeParameter)
|
||||
```
|
||||
|
||||
|
||||
```ql
|
||||
exists(Type qualifierType |
|
||||
this.hasNonExactQualifierType(qualifierType)
|
||||
|
|
Загрузка…
Ссылка в новой задаче