fix pitest, spotless and cleanup

This commit is contained in:
Michael Hoennig 2024-01-04 12:39:39 +01:00
parent ea130581a3
commit 7f98bbde64
16 changed files with 9 additions and 22 deletions

View File

@ -182,7 +182,7 @@ openApiGenerate.dependsOn processSpring
// Spotless Code Formatting
spotless {
java {
// removeUnusedImports() TODO: reactivate once it can deal with multi-line-strings
removeUnusedImports()
indentWithSpaces(4)
endWithNewline()
toggleOffOn()
@ -193,8 +193,14 @@ spotless {
}
}
}
project.tasks.spotlessJava.dependsOn(tasks.generateLicenseReport, tasks.processResources, tasks.processTestResources)
project.tasks.check.dependsOn(spotlessCheck)
// HACK: no idea why spotless uses the output of these tasks, but we get warnings without those
project.tasks.spotlessJava.dependsOn(
tasks.generateLicenseReport,
tasks.pitest,
tasks.jacocoTestReport,
tasks.processResources,
tasks.processTestResources)
// OWASP Dependency Security Test
dependencyCheck {
@ -302,7 +308,7 @@ pitest {
targetTests = ['net.hostsharing.hsadminng.**.*UnitTest', 'net.hostsharing.hsadminng.**.*RestTest']
excludedTestClasses = ['**AcceptanceTest*', '**IntegrationTest*']
pitestVersion = '1.9.9'
pitestVersion = '1.15.3'
junit5PluginVersion = '1.1.0'
threads = 4

View File

@ -1,13 +1,11 @@
package net.hostsharing.hsadminng.hs.office.coopassets;
import com.vladmihalcea.hibernate.type.basic.PostgreSQLEnumType;
import lombok.*;
import net.hostsharing.hsadminng.errors.DisplayName;
import net.hostsharing.hsadminng.hs.office.membership.HsOfficeMembershipEntity;
import net.hostsharing.hsadminng.stringify.Stringify;
import net.hostsharing.hsadminng.stringify.Stringifyable;
import org.hibernate.annotations.GenericGenerator;
import org.hibernate.annotations.Type;
import jakarta.persistence.*;
import java.math.BigDecimal;

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.office.coopassets;
import net.hostsharing.hsadminng.hs.office.coopshares.HsOfficeCoopSharesTransactionEntity;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.Repository;

View File

@ -1,12 +1,10 @@
package net.hostsharing.hsadminng.hs.office.coopshares;
import com.vladmihalcea.hibernate.type.basic.PostgreSQLEnumType;
import lombok.*;
import net.hostsharing.hsadminng.errors.DisplayName;
import net.hostsharing.hsadminng.hs.office.membership.HsOfficeMembershipEntity;
import net.hostsharing.hsadminng.stringify.Stringify;
import net.hostsharing.hsadminng.stringify.Stringifyable;
import org.hibernate.annotations.Type;
import jakarta.persistence.*;
import java.time.LocalDate;

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.office.membership;
import com.vladmihalcea.hibernate.type.basic.PostgreSQLEnumType;
import com.vladmihalcea.hibernate.type.range.PostgreSQLRangeType;
import com.vladmihalcea.hibernate.type.range.Range;
import lombok.*;

View File

@ -1,13 +1,11 @@
package net.hostsharing.hsadminng.hs.office.person;
import com.vladmihalcea.hibernate.type.basic.PostgreSQLEnumType;
import lombok.*;
import lombok.experimental.FieldNameConstants;
import net.hostsharing.hsadminng.errors.DisplayName;
import net.hostsharing.hsadminng.stringify.Stringify;
import net.hostsharing.hsadminng.stringify.Stringifyable;
import org.apache.commons.lang3.StringUtils;
import org.hibernate.annotations.Type;
import jakarta.persistence.*;
import java.util.UUID;

View File

@ -1,12 +1,10 @@
package net.hostsharing.hsadminng.hs.office.relationship;
import com.vladmihalcea.hibernate.type.basic.PostgreSQLEnumType;
import lombok.*;
import lombok.experimental.FieldNameConstants;
import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactEntity;
import net.hostsharing.hsadminng.hs.office.person.HsOfficePersonEntity;
import net.hostsharing.hsadminng.stringify.Stringify;
import org.hibernate.annotations.Type;
import jakarta.persistence.*;
import java.util.UUID;

View File

@ -11,7 +11,6 @@ import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.mvc.method.annotation.MvcUriComponentsBuilder;
import java.util.List;
import java.util.UUID;
@RestController
public class TestCustomerController implements TestCustomersApi {

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.office.bankaccount;
import java.util.UUID;
public class TestHsOfficeBankAccount {

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.office.contact;
import java.util.UUID;
public class TestHsOfficeContact {

View File

@ -2,7 +2,6 @@ package net.hostsharing.hsadminng.hs.office.debitor;
import lombok.experimental.UtilityClass;
import java.util.UUID;
import static net.hostsharing.hsadminng.hs.office.contact.TestHsOfficeContact.TEST_CONTACT;
import static net.hostsharing.hsadminng.hs.office.partner.TestHsOfficePartner.TEST_PARTNER;

View File

@ -3,7 +3,6 @@ package net.hostsharing.hsadminng.hs.office.membership;
import com.vladmihalcea.hibernate.type.range.Range;
import java.time.LocalDate;
import java.util.UUID;
import static net.hostsharing.hsadminng.hs.office.partner.TestHsOfficePartner.TEST_PARTNER;

View File

@ -3,7 +3,6 @@ package net.hostsharing.hsadminng.hs.office.partner;
import net.hostsharing.hsadminng.hs.office.contact.HsOfficeContactEntity;
import net.hostsharing.hsadminng.hs.office.person.HsOfficePersonEntity;
import java.util.UUID;
import static net.hostsharing.hsadminng.hs.office.person.HsOfficePersonType.LEGAL;

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.office.person;
import java.util.UUID;
public class TestHsOfficePerson {

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.hs.office.sepamandate;
import com.vladmihalcea.hibernate.type.range.Range;
import net.hostsharing.hsadminng.hs.office.bankaccount.HsOfficeBankAccountEntity;
import org.junit.jupiter.api.Test;

View File

@ -1,6 +1,5 @@
package net.hostsharing.hsadminng.test.cust;
import static java.util.UUID.randomUUID;
public class TestCustomer {