Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to allow comments while enforcing EmptyLineSeparator? #6143

Closed
AlexGustafsson opened this issue Oct 17, 2018 · 2 comments
Closed

How to allow comments while enforcing EmptyLineSeparator? #6143

AlexGustafsson opened this issue Oct 17, 2018 · 2 comments

Comments

@AlexGustafsson
Copy link

AlexGustafsson commented Oct 17, 2018

File causing the issue:

// Declare our package
package se.dequeue.calculator;
...

yields

.../src/App.java:2: 'package' should be separated from previous statement. [EmptyLineSeparator]

My check style.xml:
https://github.com/checkstyle/checkstyle/blob/master/src/main/resources/google_checks.xml


I would like to be able to allow comments while still blocking usage of empty lines. I could not find it mentioned in the documentation for EmptyLineSeparator.

A similar issue seems to be that comments are thought to be sections.

// Import all assertion types from the framework
import static org.junit.jupiter.api.Assertions.assertEquals;

// Import the main testing framework (JUnit 5)
import org.junit.jupiter.api.Test;
// Import our app to test
import se.dequeue.calculator.App;

yields

.../src/test/AppTest.java:5: 'org.junit.jupiter.api.Test' should be separated from previous import group by one line. [CustomImportOrder]
@romani
Copy link
Member

romani commented Oct 23, 2018

@AlexGustafsson , please report issue exactly as requested in issue template. It will answer all questions that I need to confirm issue or help you with workaround or .... .

If no proper reporting provided, issue will be closed.

@rnveach
Copy link
Member

rnveach commented Feb 27, 2019

Issue closed due to no response. Issue can be reopened with response.

@rnveach rnveach closed this as completed Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants