github / github/codeql

Java: Add ArrayTypeAccess C-style predicate

Open
#3,624 2 comments 0 reactions 0 assignees View on GitHub
Java question
Dominant language
CodeQL
Stars
10.1k
Forks
2.1k
Avg merge
2d 15h
Merged PRs (30d)
141

Description

**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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.