scalafmt: code style for scala #184

Merged
sandro.labruzzo merged 5 commits from scalafmt into beta 2022-01-12 09:58:40 +01:00

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 2022-01-12 09:56:28 +01:00
sandro.labruzzo was assigned by claudio.atzori 2022-01-12 09:56:28 +01:00
claudio.atzori added 5 commits 2022-01-12 09:56:29 +01:00
miriam.baglioni was assigned by claudio.atzori 2022-01-12 09:56:37 +01:00
sandro.labruzzo merged commit 1b9e8378b3 into beta 2022-01-12 09:58:40 +01:00
sandro.labruzzo deleted branch scalafmt 2022-01-12 09:58:40 +01:00
Author
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.
Sign in to join this conversation.
No description provided.