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

Spotless formatting #366

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

pbaumard
Copy link

@pbaumard pbaumard commented Jan 6, 2025

See green-code-initiative/creedengo-common#56

Since this is just about introducing a common format defined by Spotless, a way to check the PR is:

  1. including the spotless configuration in pom.xml from main
  2. running mvn spotless:apply
  3. checking that there is no difference with this branch

@@ -1,470 +1,511 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
Copy link
Member

Choose a reason for hiding this comment

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

why do you want to change the default tabulation configuration of IntelliJ and Visual Studio Code (tabulation = 4 characters) ?
For me, your modification is a personal modification and I think we have to keep standard IntelliJ / Visual Studio Code format rules to be homogeneous.

<plugins>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
Copy link
Member

Choose a reason for hiding this comment

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

is this plugin what updated the formatting ?

}
Copy link
Member

Choose a reason for hiding this comment

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

why do you delete this end line ? It seemed to me that it was necessary to keep the end line (old discussion with @utarwyn)

Copy link
Member

Choose a reason for hiding this comment

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

Yes indeed, files should end with an empty line. This is both good practice and a convention in many technologies.
Check more in this discussion: https://stackoverflow.com/a/5813359

@dedece35 dedece35 self-assigned this Jan 12, 2025
@dedece35
Copy link
Member

@pbaumard, please check mu comments here : green-code-initiative/creedengo-java#92

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