github / github/codeql

Java: Add ArrayTypeAccess C-style predicate

Offen
#3,624 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Java question
Vorherrschende Sprache
CodeQL
Sterne
10.1k
Forks
2.1k
Ø Merge
2 T. 15 Std.
Gemergte PRs (30 T.)
141

Beschreibung

**Description of the issue**
Would it be possible to add a predicate to `ArrayTypeAccess` which returns whether the type access uses the C-style notation?
C-style array declarations are discouraged and you can severly decrease readability:
```
int[] a, b[];

int[] test()[] {
return null;
}
```
is equivalent to:
```
int[] a;
int[][] b;

int[][] test() {
return null;
}
```

See also [JLS 14 §10.2](https://docs.oracle.com/javase/specs/jls/se14/html/jls-10.html#jls-10.2)

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.