mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Style guide: Fix whitespace.
This commit is contained in:
@@ -74,11 +74,11 @@ predicate methodStats(
|
|||||||
...
|
...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
from Method main
|
from Method main
|
||||||
where main.getName() = "Main"
|
where main.getName() = "Main"
|
||||||
select main, "This is the program entry point."
|
select main, "This is the program entry point."
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
@@ -87,13 +87,13 @@ where
|
|||||||
main.getName() = "Main" and
|
main.getName() = "Main" and
|
||||||
main.getNumberOfParameters() = 0
|
main.getNumberOfParameters() = 0
|
||||||
select main, "Main method has no parameters."
|
select main, "Main method has no parameters."
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
if x.isPublic()
|
if x.isPublic()
|
||||||
then result = "public"
|
then result = "public"
|
||||||
else result = "private"
|
else result = "private"
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
if
|
if
|
||||||
@@ -245,7 +245,7 @@ Documentation for specific items:
|
|||||||
|
|
||||||
```ql
|
```ql
|
||||||
/** Provides logic for determining constant expressions. */
|
/** Provides logic for determining constant expressions. */
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
/**
|
/**
|
||||||
@@ -253,12 +253,12 @@ Documentation for specific items:
|
|||||||
* `isExactType` indicates whether the type is exact, that is, whether
|
* `isExactType` indicates whether the type is exact, that is, whether
|
||||||
* the qualifier is guaranteed not to be a subtype of `qualifierType`.
|
* the qualifier is guaranteed not to be a subtype of `qualifierType`.
|
||||||
*/
|
*/
|
||||||
```
|
```
|
||||||
```ql
|
```ql
|
||||||
/**
|
/**
|
||||||
* A delegate declaration, for example
|
* A delegate declaration, for example
|
||||||
* ```
|
* ```
|
||||||
* delegate void Logger(string text);
|
* delegate void Logger(string text);
|
||||||
* ```
|
* ```
|
||||||
*/
|
*/
|
||||||
class Delegate extends ...
|
class Delegate extends ...
|
||||||
@@ -329,7 +329,7 @@ deprecated Expr getInitializer()
|
|||||||
reflectionOrDynamicArg(argumentType, parameterType)
|
reflectionOrDynamicArg(argumentType, parameterType)
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
this.getName() = "Finalize" and not exists(this.getAParameter())
|
this.getName() = "Finalize" and not exists(this.getAParameter())
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -360,15 +360,15 @@ deprecated Expr getInitializer()
|
|||||||
|
|
||||||
```ql
|
```ql
|
||||||
(x instanceof Exception implies x.isPublic()) and y instanceof Exception
|
(x instanceof Exception implies x.isPublic()) and y instanceof Exception
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
x instanceof Exception implies (x.isPublic() and y instanceof Exception)
|
x instanceof Exception implies (x.isPublic() and y instanceof Exception)
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
exists(Type arg | arg = this.getAChild() | arg instanceof TypeParameter)
|
exists(Type arg | arg = this.getAChild() | arg instanceof TypeParameter)
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
exists(Type qualifierType |
|
exists(Type qualifierType |
|
||||||
@@ -376,21 +376,21 @@ deprecated Expr getInitializer()
|
|||||||
|
|
|
|
||||||
result = getANonExactQualifierSubType(qualifierType)
|
result = getANonExactQualifierSubType(qualifierType)
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
methods = count(Method m | t = m.getDeclaringType() and not ilc(m))
|
methods = count(Method m | t = m.getDeclaringType() and not ilc(m))
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
if n = 0 then result = 1 else result = n * f(n - 1)
|
if n = 0 then result = 1 else result = n * f(n - 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
if n = 0
|
if n = 0
|
||||||
then result = 1
|
then result = 1
|
||||||
else result = n * f(n - 1)
|
else result = n * f(n - 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
if
|
if
|
||||||
@@ -399,7 +399,7 @@ deprecated Expr getInitializer()
|
|||||||
result = 1
|
result = 1
|
||||||
else
|
else
|
||||||
result = n * f(n - 1)
|
result = n * f(n - 1)
|
||||||
```
|
```
|
||||||
|
|
||||||
```ql
|
```ql
|
||||||
if exists(this.getContainingType())
|
if exists(this.getContainingType())
|
||||||
|
|||||||
Reference in New Issue
Block a user