google / google/styleguide

What is the style recommendation for offset on multi line annotations?

Open
#274 1 comment 1 reaction 0 assignees View on GitHub
lang:java
Dominant language
HTML
Stars
39.6k
Forks
12.9k
Avg merge
42m
Merged PRs (30d)
15

Description

This is on a file/configuration with standard 2 space indents.

Google Java Format (2 space offset)
```
@Annotation(
string1 = "abcdefghijklmnopqrstuvwxyz",
string2 = "zyxwvutsrqponmlkjihgfedcba",
boolean1 = true
)
```

Checkstyle configured with google-checks (4 space offset)
```
@Annotation(
string1 = "abcdefghijklmnopqrstuvwxyz",
string2 = "zyxwvutsrqponmlkjihgfedcba",
boolean1 = true
)
```
It's quite possible [google_checks.xml](https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml) included with checkstyle doesn't configure this explicitly and it's just falling back to something else?

Just wondering what the *right* answer is here.

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.