Skip to content

Spotless formatting#366

Open
pbaumard wants to merge 2 commits intogreen-code-initiative:mainfrom
pbaumard:feature/spotless
Open

Spotless formatting#366
pbaumard wants to merge 2 commits intogreen-code-initiative:mainfrom
pbaumard:feature/spotless

Conversation

@pbaumard
Copy link
Copy Markdown

@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
Copy Markdown
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
Copy Markdown
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 ?

"ecoScore": "0.4",
"defaultSeverity": "Minor"
} No newline at end of file
}
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Member

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

@github-actions
Copy link
Copy Markdown
Contributor

This PR has been automatically marked as stale because it has no activity for 60 days.
Please add a comment if you want to keep the issue open. Thank you for your contributions!

@github-actions github-actions bot added the stale label Mar 14, 2025
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