Skip to content

Conversation

@iamdanfox
Copy link
Contributor

Before this PR

palantir-java-format reflows javadoc comments to fit on one line if possible, e.g.:

/**
  * @param url lorem ipsum
  */	
public foo(String url) {

p-j-f reformatted:

/** @param url lorem ipsum */	
public foo(String url) {

Which resulted in checkstyle failing:

Single-line Javadoc comment should be multi-line.
ERROR: Single-line Javadoc comment should be multi-line.
Category: com.puppycrawl.tools.checkstyle.checks.javadoc.SingleLineJavadocCheck

After this PR

==COMMIT_MSG==
Checkstyle no longer complains about single-line javadoc produced by palantir-java-format.
==COMMIT_MSG==

It still works fine in IntelliJ:
Screenshot 2019-11-18 at 13 22 13

Possible downsides?

  • maybe there was some important reason for avoiding single-line javadoc that I don't know about?

@changelog-app
Copy link

changelog-app bot commented Nov 18, 2019

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Checkstyle no longer complains about single-line javadoc produced by palantir-java-format.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from markelliot November 18, 2019 13:24
@iamdanfox iamdanfox requested review from dansanduleac and removed request for markelliot November 18, 2019 13:25
@iamdanfox iamdanfox changed the title Relax SingleLineJavadoc Relax SingleLineJavadoc to avoid fighting the formatter Nov 18, 2019
@dansanduleac
Copy link
Contributor

👍

@bulldozer-bot bulldozer-bot bot merged commit 5219a41 into develop Nov 18, 2019
@bulldozer-bot bulldozer-bot bot deleted the dfox/relax-checkstyle branch November 18, 2019 13:40
This was referenced Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants