在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):SimonJPegg/mvn_scalafmt开源软件地址(OpenSource Url):https://github.com/SimonJPegg/mvn_scalafmt开源编程语言(OpenSource Language):Scala 88.7%开源软件介绍(OpenSource Introduction):SynopsisA wrapper that allows the use of the Scalafmt formatter in Maven. UsageAdd the following snippet to your pom, and it will be invoked as part of your build during the
selected lifecycle phase (default Note: You can also invoke the plugin directly via VersioningThis plugin follows the following versioning convention:
The latest release should be visible at the top of this readme. Minimal Working POM XML: <plugin>
<groupId>org.antipathy</groupId>
<!-- The scala binary here doesn't need to match the project version -->
<artifactId>mvn-scalafmt_${version.scala.binary}</artifactId>
<!-- This represents the desired version of the plugin, whould be in the form:
(major).(minor).(commitepoch).(commithash), which can be found here:
https://github.com/simonjpegg/mvn_scalafmt/releases
e.g. <version>1.0.1589620826.41b214a</version>
Note: The SCALA version is OMITTED from this value
-->
<version>__DESIRED_MVN_SCALAFMT_VERSION__</version>
<configuration>
<configLocation>${project.basedir}/.scalafmt.conf</configLocation> <!-- path to config -->
</configuration>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin> FULL SNIPPET<plugin>
<groupId>org.antipathy</groupId>
<!-- The scala binary here doesn't need to match the project version -->
<artifactId>mvn-scalafmt_${version.scala.binary}</artifactId>
<!-- This represents the desired version of the plugin, whould be in the form:
(major).(minor).(commitepoch).(commithash), which can be found here:
https://github.com/simonjpegg/mvn_scalafmt/releases
e.g. <version>1.0.1589620826.41b214a</version>
Note: The SCALA version is OMITTED from this value
-->
<version>__DESIRED_MVN_SCALAFMT_VERSION__</version>
<configuration>
<configLocation>${project.basedir}/.scalafmt.conf</configLocation> <!-- path to config -->
<skipTestSources>false</skipTestSources> <!-- (Optional) skip formatting test sources -->
<skipSources>false</skipSources> <!-- (Optional) skip formatting main sources -->
<sourceDirectories> <!-- (Optional) Paths to source-directories. Overrides ${project.build.sourceDirectory} -->
<param>${project.basedir}/src/main/scala</param>
</sourceDirectories>
<testSourceDirectories> <!-- (Optional) Paths to test-source-directories. Overrides ${project.build.testSourceDirectory} -->
<param>${project.basedir}/src/test/scala</param>
</testSourceDirectories>
<validateOnly>false</validateOnly> <!-- check formatting without changing files -->
<onlyChangedFiles>true</onlyChangedFiles> <!-- only format (staged) files that have been changed from the specified git branch -->
<showReformattedOnly>false</showReformattedOnly> <!-- log only modified files -->
<!-- The git branch to check against
If branch.startsWith(": ") the value in <branch> tag is used as a command to run
and the output will be used as the actual branch-->
<branch>: git rev-parse --abbrev-ref HEAD</branch> <!-- the current branch-->
<!-- <branch>master</branch>-->
<useSpecifiedRepositories>false</useSpecifiedRepositories> <!-- use project repositories configuration for scalafmt dynamic loading -->
</configuration>
<executions>
<execution>
<phase>validate</phase> <!-- default -->
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
make sure you have set a version in your scalafmt.conf version = "2.6.2" |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论