scalafmt: code style for scala #184

Merged
sandro.labruzzo merged 5 commits from scalafmt into beta 2 years ago
Owner

This PR introduces a maven plugin to reformat automatically the scala classes available in the project. https://scalameta.org/scalafmt

<plugin>
	<groupId>org.antipathy</groupId>
	<artifactId>mvn-scalafmt_2.11</artifactId>
	<version>1.0.1640073709.733712b</version>
</plugin>

In order to support the automatic formatting across the different modules, the type definitions are stored in the dhp-code-stype submodule:

dhp-build/dhp-code-style/src/main/resources/scalafmt/scalafmt.conf
This PR introduces a maven plugin to reformat automatically the scala classes available in the project. https://scalameta.org/scalafmt ``` <plugin> <groupId>org.antipathy</groupId> <artifactId>mvn-scalafmt_2.11</artifactId> <version>1.0.1640073709.733712b</version> </plugin> ``` In order to support the automatic formatting across the different modules, the type definitions are stored in the `dhp-code-stype` submodule: ``` dhp-build/dhp-code-style/src/main/resources/scalafmt/scalafmt.conf ```
claudio.atzori added the
enhancement
label 2 years ago
sandro.labruzzo was assigned by claudio.atzori 2 years ago
claudio.atzori added 5 commits 2 years ago
miriam.baglioni was assigned by claudio.atzori 2 years ago
sandro.labruzzo merged commit 1b9e8378b3 into beta 2 years ago
sandro.labruzzo deleted branch scalafmt 2 years ago
Poster
Owner

As a reference: in order to make the plugin work while compiling the project from the root, as well as on the individual module level (e.g. while oozie-packaging, deploying, running an oozie workflow) the reference to the scalafmt configuration file needed to be expressed as a remote location. I currently set it statically to

https://code-repo.d4science.org/D-Net/dnet-hadoop/raw/branch/beta/dhp-build/dhp-code-style/src/main/resources/scalafmt/scalafmt.conf

A better and more stable location will be updated later on.

As a reference: in order to make the plugin work while compiling the project from the root, as well as on the individual module level (e.g. while oozie-packaging, deploying, running an oozie workflow) the reference to the scalafmt configuration file needed to be expressed as a remote location. I currently set it statically to https://code-repo.d4science.org/D-Net/dnet-hadoop/raw/branch/beta/dhp-build/dhp-code-style/src/main/resources/scalafmt/scalafmt.conf A better and more stable location will be updated later on.
The pull request has been merged as 1b9e8378b3.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b scalafmt beta
git pull origin scalafmt

Step 2:

Merge the changes and update on Gitea.
git checkout beta
git merge --no-ff scalafmt
git push origin beta
Sign in to join this conversation.
No reviewers
No Milestone
No project
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: D-Net/dnet-hadoop#184
Loading…
There is no content yet.