mirror of
https://github.com/github/codeql.git
synced 2026-04-29 10:45:15 +02:00
Merge pull request #5080 from github/RasmusWL/naming-for-acronyms
Update CodeQL Style guide to mention acronyms
This commit is contained in:
@@ -173,6 +173,7 @@ private predicate foo(Expr e, Expr p) {
|
||||
1. Use [camelCase](https://en.wikipedia.org/wiki/Camel_case) for:
|
||||
- Predicate names
|
||||
- Variable names
|
||||
1. Acronyms *should* use normal PascalCase/camelCase (as an exception, if there are only two letters then using all uppercase letters is acceptable).
|
||||
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...`
|
||||
@@ -183,6 +184,7 @@ private predicate foo(Expr e, Expr p) {
|
||||
1. Use names as they are used in the target-language specification.
|
||||
1. Use American English.
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
```ql
|
||||
@@ -209,6 +211,9 @@ class Type extends ... {
|
||||
|
||||
/** ... */
|
||||
Type getATypeParameter() { ... }
|
||||
|
||||
/** Gets the SSA variable ... */
|
||||
predicate getSsaVariable() { ... }
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user