GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java: Autoformat qls. · github/codeql@2546963

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • java/ql/src
    • Likely Bugs
      • Arithmetic
        • CondExprTypes.ql
      • Concurrency
        • LazyInitStaticField.ql
      • Likely Typos
        • ContainerSizeCmpZero.ql
    • Performance
      • ConcatenationInLoops.ql
      • InefficientToArray.ql
    • Security/CWE
      • CWE-190
        • ArithmeticWithExtremeValues.ql
      • CWE-798
        • HardcodedCredentialsComparison.ql
      • CWE-807
        • TaintedPermissionsCheck.ql
    • Violations of Best Practice
      • Declarations
        • NoConstantsOnly.ql
      • legacy
        • AutoBoxing.ql
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎java/ql/src/Likely Bugs/Arithmetic/CondExprTypes.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Likely Bugs/Arithmetic/CondExprTypes.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
import java
1414

15-
class CharType extends PrimitiveType { CharType() { this.hasName("char") } }
15+
class CharType extends PrimitiveType {
16+
CharType() { this.hasName("char") }
17+
}
1618

1719
private Type getABranchType(ConditionalExpr ce) {
1820
result = ce.getTrueExpr().getType() or
Collapse file

‎java/ql/src/Likely Bugs/Concurrency/LazyInitStaticField.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Likely Bugs/Concurrency/LazyInitStaticField.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
import java
1717

1818
/** A comparison (using `==`) with `null`. */
19-
class NullEQExpr extends EQExpr { NullEQExpr() { exists(NullLiteral l | l.getParent() = this) } }
19+
class NullEQExpr extends EQExpr {
20+
NullEQExpr() { exists(NullLiteral l | l.getParent() = this) }
21+
}
2022

2123
/** An assignment to a static field. */
2224
class StaticFieldInit extends AssignExpr {
Collapse file

‎java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Likely Bugs/Likely Typos/ContainerSizeCmpZero.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ import semmle.code.java.Collections
1515
import semmle.code.java.Maps
1616

1717
/** A union of the possible kinds of container size calls. */
18-
abstract class SizeOfContainer extends Expr { abstract string getContainerKind(); }
18+
abstract class SizeOfContainer extends Expr {
19+
abstract string getContainerKind();
20+
}
1921

2022
/** A read access to the `length` field of an array. */
2123
class ArrayLengthRead extends FieldRead, SizeOfContainer {
Collapse file

‎java/ql/src/Performance/ConcatenationInLoops.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Performance/ConcatenationInLoops.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ import semmle.code.java.Statement
1616
import semmle.code.java.JDK
1717

1818
/** A use of `+` that has type `String`. */
19-
class StringCat extends AddExpr { StringCat() { this.getType() instanceof TypeString } }
19+
class StringCat extends AddExpr {
20+
StringCat() { this.getType() instanceof TypeString }
21+
}
2022

2123
/**
2224
* An assignment of the form
Collapse file

‎java/ql/src/Performance/InefficientToArray.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Performance/InefficientToArray.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ predicate emptyArrayLiteral(Expr e) {
3939
)
4040
}
4141

42-
class EmptyArrayLiteral extends Expr { EmptyArrayLiteral() { emptyArrayLiteral(this) } }
42+
class EmptyArrayLiteral extends Expr {
43+
EmptyArrayLiteral() { emptyArrayLiteral(this) }
44+
}
4345

4446
from EmptyArrayLiteral l, MethodAccess ma, Method m, GenericInterface coll
4547
where
Collapse file

‎java/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Security/CWE/CWE-190/ArithmeticWithExtremeValues.ql
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,13 @@ abstract class ExtremeValueField extends Field {
2121
ExtremeValueField() { getType() instanceof IntegralType }
2222
}
2323

24-
class MinValueField extends ExtremeValueField { MinValueField() { this.getName() = "MIN_VALUE" } }
24+
class MinValueField extends ExtremeValueField {
25+
MinValueField() { this.getName() = "MIN_VALUE" }
26+
}
2527

26-
class MaxValueField extends ExtremeValueField { MaxValueField() { this.getName() = "MAX_VALUE" } }
28+
class MaxValueField extends ExtremeValueField {
29+
MaxValueField() { this.getName() = "MAX_VALUE" }
30+
}
2731

2832
class ExtremeSource extends VarAccess {
2933
ExtremeSource() { this.getVariable() instanceof ExtremeValueField }
Collapse file

‎java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsComparison.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Security/CWE/CWE-798/HardcodedCredentialsComparison.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
import java
1313
import HardcodedCredentials
1414

15-
class EqualsAccess extends MethodAccess { EqualsAccess() { getMethod() instanceof EqualsMethod } }
15+
class EqualsAccess extends MethodAccess {
16+
EqualsAccess() { getMethod() instanceof EqualsMethod }
17+
}
1618

1719
from EqualsAccess sink, HardcodedExpr source, PasswordVariable p
1820
where
Collapse file

‎java/ql/src/Security/CWE/CWE-807/TaintedPermissionsCheck.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Security/CWE/CWE-807/TaintedPermissionsCheck.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ class TypeShiroWCPermission extends RefType {
2525
}
2626
}
2727

28-
abstract class PermissionsConstruction extends Top { abstract Expr getInput(); }
28+
abstract class PermissionsConstruction extends Top {
29+
abstract Expr getInput();
30+
}
2931

3032
class PermissionsCheckMethodAccess extends MethodAccess, PermissionsConstruction {
3133
PermissionsCheckMethodAccess() {
Collapse file

‎java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Violations of Best Practice/Declarations/NoConstantsOnly.ql
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212

1313
import semmle.code.java.Member
1414

15-
class ConstantField extends Field { ConstantField() { this.isStatic() and this.isFinal() } }
15+
class ConstantField extends Field {
16+
ConstantField() { this.isStatic() and this.isFinal() }
17+
}
1618

1719
pragma[noinline]
1820
predicate typeWithConstantField(RefType t) { exists(ConstantField f | f.getDeclaringType() = t) }
Collapse file

‎java/ql/src/Violations of Best Practice/legacy/AutoBoxing.ql‎

Copy file name to clipboardExpand all lines: java/ql/src/Violations of Best Practice/legacy/AutoBoxing.ql
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,14 @@
1212
import java
1313

1414
/** An expression of primitive type. */
15-
class PrimitiveExpr extends Expr { PrimitiveExpr() { this.getType() instanceof PrimitiveType } }
15+
class PrimitiveExpr extends Expr {
16+
PrimitiveExpr() { this.getType() instanceof PrimitiveType }
17+
}
1618

1719
/** An expression of boxed type. */
18-
class BoxedExpr extends Expr { BoxedExpr() { this.getType() instanceof BoxedType } }
20+
class BoxedExpr extends Expr {
21+
BoxedExpr() { this.getType() instanceof BoxedType }
22+
}
1923

2024
/**
2125
* Relate expressions and the variables they flow into in one step,

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.