Closed koppor closed 8 months ago
Your code currently does not meet JabRef's code guidelines. We use Checkstyle to identify issues. The tool reviewdog already placed comments on GitHub to indicate the places. See the tab "Files" in you PR. Please carefully follow the setup guide for the codestyle. Afterwards, please run checkstyle locally and fix the issues.
More information on code quality in JabRef is available at https://devdocs.jabref.org/getting-into-the-code/development-strategy.html.
Mabye spotless ? https://github.com/diffplug/spotless
Wait for another PR - I have success with palantir-java-format.
That is a) more maintained and b) seems to work well and c) has better formatting than GJF:
(1) google-java-format output:
private static void configureResolvedVersionsWithVersionMapping(Project project) {
project.getPluginManager()
.withPlugin(
"maven-publish",
plugin -> {
project.getExtensions()
.getByType(PublishingExtension.class)
.getPublications()
.withType(MavenPublication.class)
.configureEach(
publication ->
publication.versionMapping(
mapping -> {
mapping.allVariants(
VariantVersionMappingStrategy
::fromResolutionResult);
}));
});
}
(1) palantir-java-format output:
private static void configureResolvedVersionsWithVersionMapping(Project project) {
project.getPluginManager().withPlugin("maven-publish", plugin -> {
project.getExtensions()
.getByType(PublishingExtension.class)
.getPublications()
.withType(MavenPublication.class)
.configureEach(publication -> publication.versionMapping(mapping -> {
mapping.allVariants(VariantVersionMappingStrategy::fromResolutionResult);
}));
});
}
New try at https://github.com/koppor/jabref/pull/663
I am so fed up that
Thus, I am looking for good autoformatting tools. The most prominent tool with style guide is Google's:
This PR adds it.
Let's hope for the best that the reformatting action a) really adds a new commit and b) the contributors will be able to pull these changes 😅🙈
I am aware, that there is no maintained gradle plugin.
I am also aware, that Eclipse AOSP since 5 years (https://github.com/google/google-java-format/pull/251), but maybe, this will be resolved.
Blockers
Mandatory checks
CHANGELOG.md
described in a way that is understandable for the average user (if applicable)