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

Add style check and also fix style violations #3

Closed
wants to merge 1 commit into from
Closed

Conversation

kelloggm
Copy link
Collaborator

No description provided.

@kelloggm kelloggm requested a review from mernst June 21, 2019 21:13
// uncomment this line to temporarily disable spotless (i.e. when debugging)
// enforceCheck = false
java {
googleJavaFormat()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

google-java-format produces bad formatting for type annotations.
Therefore, I don't think its use should be encouraged, in projects related to type annotations, until google/google-java-format#5 is fixed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have a suggestion for a style checker that does not have bad formatting for type annotations? I'm not aware of one.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/plume-lib/run-google-java-format
It's not as convenient to use (ugly Gradle integration), but it formats correctly.

"-Astubs=stubs/",
"-nowarn");
}
public TemplateforaTest(List<File> testFiles) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Checker Framework uses the -a command-line argument to google-java-format, for 4-space indentation.
I dislike that, but we might want to keep this project consistent with the other Checker Framework repositories.

@kelloggm kelloggm closed this Aug 8, 2019
@mernst mernst deleted the style branch September 23, 2020 01:42
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

Successfully merging this pull request may close these issues.

2 participants