Skip to content

Commit

Permalink
style: add Java linter (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharking authored Oct 7, 2024
1 parent 5dc9cd1 commit 9bbb735
Show file tree
Hide file tree
Showing 70 changed files with 2,218 additions and 2,244 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: PR Check

on:
pull_request:
branches: [ main, dev ]

env:
QUARKUS_CONTAINER_IMAGE_USERNAME: ${{ secrets.DOCKER_HUB_LOGIN }}
QUARKUS_CONTAINER_IMAGE_PASSWORD: ${{ secrets.DOCKER_HUB_PWD }}

jobs:
pr_check:
runs-on: ubuntu-latest
steps:
- name: Checkout gh-repo
uses: actions/checkout@v3

- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: temurin
cache: maven

- name: Clean and spotless
run: |
# Skipping Docker image build for PR verification
mvn clean fmt:check
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
Client tools for building Quarkus java DIDcomm Verifiable Credential powered conversational service (Chatbots) with [2060.io Service Agent](https://github.com/2060-io/2060-service-agent/blob/main/doc/service-agent-api.md)

## How to use
On dev mode use the command `mvn clean install -Dgpg.skip` to run the project
- On dev mode use the command `mvn clean install -Dgpg.skip` to run the project
- To apply format run `mvn fmt:format`

## Releases

Expand Down
17 changes: 16 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,21 @@
<build>
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.23</version>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
<configuration>
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
Expand Down Expand Up @@ -124,7 +139,7 @@
</execution>
</executions>
</plugin>
</plugins>
</plugins>
<pluginManagement>
<!-- lock down plugins versions to avoid using Maven defaults (may be moved to parent pom) -->
<plugins>
Expand Down
129 changes: 64 additions & 65 deletions src/main/java/io/twentysixty/sa/client/enums/Mrz.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
Expand All @@ -15,69 +14,69 @@
@Setter
@ToString
public class Mrz {
public enum Format {
@JsonProperty("TD1")
TD1,
@JsonProperty("TD2")
TD2,
@JsonProperty("TD3")
TD3,
@JsonProperty("FRENCH_NATIONAL_ID")
FRENCH_NATIONAL_ID,
@JsonProperty("FRENCH_DRIVING_LICENSE")
FRENCH_DRIVING_LICENSE,
@JsonProperty("SWISS_DRIVING_LICENSE")
SWISS_DRIVING_LICENSE;
}
public enum Format {
@JsonProperty("TD1")
TD1,
@JsonProperty("TD2")
TD2,
@JsonProperty("TD3")
TD3,
@JsonProperty("FRENCH_NATIONAL_ID")
FRENCH_NATIONAL_ID,
@JsonProperty("FRENCH_DRIVING_LICENSE")
FRENCH_DRIVING_LICENSE,
@JsonProperty("SWISS_DRIVING_LICENSE")
SWISS_DRIVING_LICENSE;
}

public enum FieldName {
@JsonProperty("administrativeCode")
ADMINISTRATIVE_CODE,
@JsonProperty("administrativeCode2")
ADMINISTRATIVE_CODE2,
@JsonProperty("birthDate")
BIRTH_DATE,
@JsonProperty("birthDateCheckDigit")
BIRTH_DATE_CHECK_DIGIT,
@JsonProperty("compositeCheckDigit")
COMPOSITE_CHECK_DIGIT,
@JsonProperty("documentNumber")
DOCUMENT_NUMBER,
@JsonProperty("documentNumberCheckDigit")
DOCUMENT_NUMBER_CHECK_DIGIT,
@JsonProperty("documentCode")
DOCUMENT_CODE,
@JsonProperty("expirationDate")
EXPIRATION_DATE,
@JsonProperty("expirationDateCheckDigit")
EXPIRATION_DATE_CHECK_DIGIT,
@JsonProperty("firstName")
FIRST_NAME,
@JsonProperty("issueDate")
ISSUE_DATE,
@JsonProperty("issuingState")
ISSUING_STATE,
@JsonProperty("languageCode")
LANGUAGE_CODE,
@JsonProperty("lastName")
LAST_NAME,
@JsonProperty("nationality")
NATIONALITY,
@JsonProperty("optional")
OPTIONAL,
@JsonProperty("optional1")
OPTIONAL1,
@JsonProperty("optional2")
OPTIONAL2,
@JsonProperty("personalNumber")
PERSONAL_NUMBER,
@JsonProperty("personalNumberCheckDigit")
PERSONAL_NUMBER_CHECK_DIGIT,
@JsonProperty("pinCode")
PIN_CODE,
@JsonProperty("sex")
SEX,
@JsonProperty("versionNumber")
VERSION_NUMBER;
}
public enum FieldName {
@JsonProperty("administrativeCode")
ADMINISTRATIVE_CODE,
@JsonProperty("administrativeCode2")
ADMINISTRATIVE_CODE2,
@JsonProperty("birthDate")
BIRTH_DATE,
@JsonProperty("birthDateCheckDigit")
BIRTH_DATE_CHECK_DIGIT,
@JsonProperty("compositeCheckDigit")
COMPOSITE_CHECK_DIGIT,
@JsonProperty("documentNumber")
DOCUMENT_NUMBER,
@JsonProperty("documentNumberCheckDigit")
DOCUMENT_NUMBER_CHECK_DIGIT,
@JsonProperty("documentCode")
DOCUMENT_CODE,
@JsonProperty("expirationDate")
EXPIRATION_DATE,
@JsonProperty("expirationDateCheckDigit")
EXPIRATION_DATE_CHECK_DIGIT,
@JsonProperty("firstName")
FIRST_NAME,
@JsonProperty("issueDate")
ISSUE_DATE,
@JsonProperty("issuingState")
ISSUING_STATE,
@JsonProperty("languageCode")
LANGUAGE_CODE,
@JsonProperty("lastName")
LAST_NAME,
@JsonProperty("nationality")
NATIONALITY,
@JsonProperty("optional")
OPTIONAL,
@JsonProperty("optional1")
OPTIONAL1,
@JsonProperty("optional2")
OPTIONAL2,
@JsonProperty("personalNumber")
PERSONAL_NUMBER,
@JsonProperty("personalNumberCheckDigit")
PERSONAL_NUMBER_CHECK_DIGIT,
@JsonProperty("pinCode")
PIN_CODE,
@JsonProperty("sex")
SEX,
@JsonProperty("versionNumber")
VERSION_NUMBER;
}
}
Loading

0 comments on commit 9bbb735

Please sign in to comment.