mirror of
https://github.com/tencentmusic/supersonic.git
synced 2026-01-05 08:47:57 +08:00
(chore)(sytle) Apply Python styling by black via spotless maven plugin (#113)
* introduce spotless maven plugin with Python black for styling
This commit is contained in:
43
pom.xml
43
pom.xml
@@ -65,6 +65,11 @@
|
||||
<mockito-inline.version>4.5.1</mockito-inline.version>
|
||||
<jsqlparser.version>4.5</jsqlparser.version>
|
||||
<revision>0.7.5-SNAPSHOT</revision>
|
||||
<!-- Do not bump spotless plugin version since 2.30.0 is the latest version supports Java 8-->
|
||||
<maven.plugin.spotless.version>2.30.0</maven.plugin.spotless.version>
|
||||
<spotless.python.includes></spotless.python.includes>
|
||||
<!-- Do not bump black version as decided by spotless maven plugin-->
|
||||
<spotless.python.black.version>22.3.0</spotless.python.black.version>
|
||||
</properties>
|
||||
|
||||
<dependencyManagement>
|
||||
@@ -101,6 +106,15 @@
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
<profiles>
|
||||
<profile>
|
||||
<id>spotless-python</id>
|
||||
<properties>
|
||||
<spotless.python.includes>src/**/*.py</spotless.python.includes>
|
||||
</properties>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
@@ -147,6 +161,10 @@
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
@@ -185,6 +203,31 @@
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>com.diffplug.spotless</groupId>
|
||||
<artifactId>spotless-maven-plugin</artifactId>
|
||||
<version>${maven.plugin.spotless.version}</version>
|
||||
<configuration>
|
||||
<upToDateChecking>
|
||||
<enabled>true</enabled>
|
||||
</upToDateChecking>
|
||||
<python>
|
||||
<includes>
|
||||
<include>${spotless.python.includes}</include>
|
||||
</includes>
|
||||
<black>
|
||||
<version>${spotless.python.black.version}</version>
|
||||
</black>
|
||||
</python>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
Reference in New Issue
Block a user