google / google/styleguide

inconsistent formatting with Eclipse and IntelliJ java files

Open
#420 0 comments 2 reactions 0 assignees View on GitHub
lang:java
Dominant language
HTML
Stars
39.6k
Forks
12.9k
Avg merge
42m
Merged PRs (30d)
15

Description

I am using IntelliJ [google style plugin](https://github.com/google/google-java-format/tree/master/idea_plugin) and my colleague is using the Eclipse style xml file

when formatting the same file we get different results in javadoc segments

i.e. formatting this line produces different results:

**source**
```
/**
* Send this Quote to shipper - only applies to to Quote with {@link FreightDraftQuote#getResponseToRFQSource()} being custom ({@link RFQSource#MP_CUSTOM_REQUEST}
*/
```

produces the following result on both IDEs:
**IntelliJ:**
```
/**
* Send this Quote to shipper - only applies to to Quote with {@link
* FreightDraftQuote#getResponseToRFQSource()} being custom ({@link RFQSource#MP_CUSTOM_REQUEST},
*/
```

**Eclipse:**
```
/**
* Send this Quote to shipper - only applies to to Quote with
* {@link FreightDraftQuote#getResponseToRFQSource()} being custom
* ({@link RFQSource#MP_CUSTOM_REQUEST}
*/
```

also, IntelliJ deletes the last lines of Javadocs while Eclipse keeps them
i.e. when having this in Eclipse untouched:
```
/**
* @return valus
*
*/
```
IntelliJ removes the last line and Eclipse keeps it

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.