Skip to content

Commit d2b9822

Browse files
committed
Merge prettierSkip and rewrite skip into formattingSkip profile
1 parent 5fbf6c2 commit d2b9822

File tree

5 files changed

+22
-12
lines changed

5 files changed

+22
-12
lines changed

.github/workflows/cibuild.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
exit 1;
5757
fi
5858
mvn jacoco:prepare-agent test jacoco:report -P prettierCheck -Dprettier.nodePath=node -Dprettier.npmPath=npm
59-
mvn package -Dmaven.test.skip -P prettierSkip
59+
mvn package -Dmaven.test.skip -P formattingSkip
6060
6161
- name: Send coverage data to codecov.io
6262
if: github.repository_owner == 'opentripplanner'
@@ -77,7 +77,7 @@ jobs:
7777
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev-1.x' || github.ref == 'refs/heads/dev-2.x')
7878
env:
7979
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80-
run: mvn deploy --settings maven-settings.xml -DskipTests -DGITHUB_REPOSITORY=$GITHUB_REPOSITORY -P prettierSkip -P deployGitHub
80+
run: mvn deploy --settings maven-settings.xml -DskipTests -DGITHUB_REPOSITORY=$GITHUB_REPOSITORY -P formattingSkip -P deployGitHub
8181

8282
build-windows:
8383
timeout-minutes: 20
@@ -95,7 +95,7 @@ jobs:
9595
- name: Configure Windows Pagefile
9696
uses: al-cheb/[email protected]
9797
- name: Run tests
98-
run: mvn test -P prettierSkip
98+
run: mvn test -P formattingSkip
9999

100100
docs:
101101
if: github.repository_owner == 'opentripplanner'
@@ -208,7 +208,7 @@ jobs:
208208
distribution: temurin
209209
cache: maven
210210
- name: Compile Java code
211-
run: mvn compile -DskipTests -P prettierSkip
211+
run: mvn compile -DskipTests -P formattingSkip
212212

213213
container-image:
214214
if: github.repository_owner == 'opentripplanner' && github.event_name == 'push' && (github.ref == 'refs/heads/dev-2.x' || github.ref == 'refs/heads/master')
@@ -251,6 +251,6 @@ jobs:
251251
echo "Maven version ${version_with_snapshot} contains SNAPSHOT, adding date to container image tag"
252252
fi
253253
254-
MAVEN_SKIP_ARGS="-P prettierSkip -Dmaven.test.skip=true -Dmaven.source.skip=true"
254+
MAVEN_SKIP_ARGS="-P formattingSkip -Dmaven.test.skip=true -Dmaven.source.skip=true"
255255
256256
mvn $MAVEN_SKIP_ARGS package com.google.cloud.tools:jib-maven-plugin:build -Djib.to.tags=latest,$image_version

.github/workflows/performance-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'
8585
env:
8686
MAVEN_OPTS: "-Dmaven.repo.local=/home/lenni/.m2/repository/"
87-
run: mvn -DskipTests --batch-mode install -P prettierSkip
87+
run: mvn -DskipTests --batch-mode install -P formattingSkip
8888

8989
- name: Build graph
9090
if: matrix.profile == 'core' || github.ref == 'refs/heads/dev-2.x'

doc/dev/decisionrecords/Codestyle.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,25 @@ test, package, and install phases. So formatting will happen for example when yo
2323
% mvn test
2424
```
2525

26-
You can manually run _only_ the formatting process with:
26+
You can manually run _only_ the rewrite formatting process with:
27+
28+
```shell
29+
% mvn rewrite:run
30+
```
31+
32+
You can manually run _only_ the prettier formatting process with:
2733

2834
```shell
2935
% mvn prettier:write
3036
```
3137

32-
To skip the Prettier formating, use the profile `prettierSkip`:
38+
To skip the Prettier and rewrite formating, use the profile `formattingSkip`:
3339

3440
```shell
35-
% mvn test -P prettierSkip
41+
% mvn test -P formattingSkip
3642
```
3743

38-
To check for formatting errors, use the profile `prettierCheck`:
44+
To check for prettier formatting errors, use the profile `prettierCheck`:
3945

4046
```shell
4147
% mvn test -P prettierCheck

pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<plugin.prettier.version>0.22</plugin.prettier.version>
8888
<plugin.prettier.goal>write</plugin.prettier.goal>
8989
<plugin.prettier.skip>false</plugin.prettier.skip>
90+
<plugin.rewrite.skip>false</plugin.rewrite.skip>
9091
<skip-source-and-javadoc>true</skip-source-and-javadoc>
9192
<tests.excludedGroups>integration</tests.excludedGroups>
9293
<tests.includedGroups></tests.includedGroups>
@@ -300,6 +301,7 @@
300301
<runPerSubmodule>true</runPerSubmodule>
301302
<sizeThresholdMb>0</sizeThresholdMb>
302303
<configLocation>${maven.multiModuleProjectDirectory}/openrewrite.yml</configLocation>
304+
<rewriteSkip>${plugin.rewrite.skip}</rewriteSkip>
303305
</configuration>
304306
<dependencies>
305307
<dependency>
@@ -530,7 +532,7 @@
530532
</properties>
531533
</profile>
532534
<profile>
533-
<id>prettierSkip</id>
535+
<id>formattingSkip</id>
534536
<activation>
535537
<property>
536538
<!--
@@ -544,6 +546,7 @@
544546
</activation>
545547
<properties>
546548
<plugin.prettier.skip>true</plugin.prettier.skip>
549+
<plugin.rewrite.skip>true</plugin.rewrite.skip>
547550
</properties>
548551
</profile>
549552
<profile>
@@ -598,6 +601,7 @@
598601
<tests.includedGroups>integration</tests.includedGroups>
599602
<tests.excludedGroups></tests.excludedGroups>
600603
<plugin.prettier.skip>true</plugin.prettier.skip>
604+
<plugin.rewrite.skip>true</plugin.rewrite.skip>
601605
</properties>
602606
</profile>
603607

script/custom-release.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,7 +775,7 @@ def read_ser_ver_id_from_pom_file(git_hash):
775775

776776
def run_maven_test():
777777
if section_w_resume('run_maven_test', 'Run unit tests'):
778-
mvn('clean', '-PprettierSkip', 'test')
778+
mvn('clean', '-PformattingSkip', 'test')
779779

780780

781781
# Get the full git hash for a qualified branch name, tag or hash

0 commit comments

Comments
 (0)