Skip to content

Commit a7e9e87

Browse files
authored
Merge branch 'hibernate:main' into HV-2053
2 parents e467fa9 + 12326b4 commit a7e9e87

File tree

436 files changed

+5257
-3550
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

436 files changed

+5257
-3550
lines changed

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,9 @@
22
0caebd08d86a7b95f4ad654bce952b80f6f99327
33
7fe0c66d69ae352d9c86da7280b9d06e25f38c9e
44
38b56206a9db2e0b93f5da122735a725d89ba516
5+
# Switch to spotless maven plugin and additional code reformatting:
6+
ad925a4974454fa36cce296ea18efd9bade21d7c
7+
8dc7102745b44020769fb14e8d9c724820eb755b
8+
26e305f5fbeed20c23ea05ef2b2b1e60993d9a17
9+
a96de990009411ced75eef8c1db0aafc6661b861
10+
86381b010be89bc801b745aeda40f1541fbcf664

CONTRIBUTING.md

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,33 @@ Code away...
5959

6060
## Formatting rules and style conventions
6161

62-
The Hibernate family projects share the same style conventions. You can download the appropriate configuration
63-
files for your IDE from [the IDE codestyles GitHub repository](https://github.com/hibernate/hibernate-ide-codestyles).
62+
The project build comes with preconfigured plugins that apply automatic formatting/sorting of imports and
63+
a set of other checks. Running a simple build should automatically apply all the formatting rules and checks:
6464

65-
You can very quickly check that you have respected the formatting rules by running Checkstyle:
6665
```shell
67-
mvn checkstyle:check
66+
mvn clean verify
6867
```
6968

69+
Alternatively, if only applying the formatting is required, you could run the next command:
70+
71+
```shell
72+
mvn spotless:apply checkstyle:check
73+
```
74+
75+
---
76+
**NOTE**: running the above command requires the `org.hibernate.validator:hibernate-validator-build-config`
77+
being available. If it is a first time building the project you may need to execute:
78+
```shell
79+
mvn clean install -am -pl build/build-config
80+
```
81+
---
82+
83+
The project comes with formatting files located in:
84+
- [hibernate_validator_style.xml](build/build-config/src/main/resources/hibernate_validator_style.xml)
85+
- [hibernate_validator_style.importorder](build/build-config/src/main/resources/hibernate_validator_style.importorder)
86+
87+
These files can be used in the IDE if applying formatting as-you-code within the IDE is something you'd prefer.
88+
7089
## Commit
7190

7291
* Make commits of logical units.

annotation-processor/pom.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -83,14 +83,6 @@
8383
<proc>none</proc>
8484
</configuration>
8585
</plugin>
86-
<plugin>
87-
<groupId>org.apache.maven.plugins</groupId>
88-
<artifactId>maven-checkstyle-plugin</artifactId>
89-
</plugin>
90-
<plugin>
91-
<groupId>de.thetaphi</groupId>
92-
<artifactId>forbiddenapis</artifactId>
93-
</plugin>
9486
<plugin>
9587
<artifactId>maven-jar-plugin</artifactId>
9688
<executions>

annotation-processor/src/main/java/org/hibernate/validator/ap/internal/AbstractElementVisitor.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,3 @@ else if ( issue.isWarning() ) {
6262
messager.reportWarnings( warnings );
6363
}
6464
}
65-

annotation-processor/src/main/java/org/hibernate/validator/ap/internal/checks/GetterCheck.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,4 +63,3 @@ private boolean isJavaBeanGetterName(String methodName) {
6363
}
6464

6565
}
66-

annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/BazDefaultGroupSequenceProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@
1616
*/
1717
public interface BazDefaultGroupSequenceProvider extends DefaultGroupSequenceProvider<Baz> {
1818
@Override
19-
List<Class<?>> getValidationGroups(GroupSequenceProviderDefinition.Baz object);
19+
List<Class<?>> getValidationGroups(Class<?> klass, GroupSequenceProviderDefinition.Baz object);
2020
}

annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarBazDefaultGroupSequenceProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public FooBarBazDefaultGroupSequenceProvider(FooBarBaz fooBarBaz) {
2020
}
2121

2222
@Override
23-
public List<Class<?>> getValidationGroups(FooBarBaz object) {
23+
public List<Class<?>> getValidationGroups(Class<?> klass, FooBarBaz object) {
2424
return null;
2525
}
2626
}

annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooBarDefaultGroupSequenceProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@
1717
public abstract class FooBarDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<FooBar> {
1818

1919
@Override
20-
public abstract List<Class<?>> getValidationGroups(FooBar object);
20+
public abstract List<Class<?>> getValidationGroups(Class<?> klass, FooBar object);
2121
}

annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/FooDefaultGroupSequenceProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class FooDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<Foo> {
1818

1919
@Override
20-
public List<Class<?>> getValidationGroups(Foo object) {
20+
public List<Class<?>> getValidationGroups(Class<?> klass, Foo object) {
2121
return null;
2222
}
2323
}

annotation-processor/src/test/java/org/hibernate/validator/ap/testmodel/groupsequenceprovider/QuxDefaultGroupSequenceProvider.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
public class QuxDefaultGroupSequenceProvider implements DefaultGroupSequenceProvider<Qux> {
1818

1919
@Override
20-
public List<Class<?>> getValidationGroups(Qux object) {
20+
public List<Class<?>> getValidationGroups(Class<?> klass, Qux object) {
2121
return null;
2222
}
2323
}

0 commit comments

Comments
 (0)