Skip to content

Commit c9ad255

Browse files
chore: Add pretty-format-java to pre-commit
1 parent dc9ca05 commit c9ad255

26 files changed

+2072
-1640
lines changed

.pre-commit-config.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,13 @@ repos:
4949
- id: golangci-lint
5050
language: system
5151
entry: bash -c "cd server && golangci-lint run"
52+
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
53+
rev: v2.9.0
54+
hooks:
55+
- id: pretty-format-java
56+
args: [--autofix]
57+
#- repo: https://github.com/gherynos/pre-commit-java
58+
# rev: v0.2.1
59+
# hooks:
60+
# - id: checkstyle
61+
# exclude: src/test/

.tool-versions

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ golang 1.20.3
33
golangci-lint 1.52.2
44
helm 3.10.0
55
helm-docs 1.11.0
6+
java adoptopenjdk-11.0.16+101
67
k9s 0.26.7
78
kubectl 1.26.3
89
kubectx 0.9.4

client.Dockerfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
FROM --platform=linux/amd64 openjdk:11-jdk-slim-buster AS mvn-build
33

44
RUN apt-get update && \
5-
apt-get install -y --no-install-recommends \
5+
apt-get install -y \
66
maven \
77
&& apt-get clean && rm -rf /var/lib/apt/lists/*
88

@@ -22,7 +22,7 @@ RUN mvn compile assembly:single install
2222
FROM --platform=linux/amd64 ubuntu:20.04 AS mvn-release
2323

2424
RUN apt-get update && \
25-
apt-get install -y --no-install-recommends \
25+
apt-get install -y \
2626
openjdk-11-jre \
2727
&& apt-get clean && rm -rf /var/lib/apt/lists/*
2828

+5-10
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,8 @@
11
package com.nfehs.librarygames;
22

3-
/**
4-
* Hello world!
5-
*
6-
*/
7-
public class App
8-
{
9-
public static void main( String[] args )
10-
{
11-
System.out.println( "Hello World!" );
12-
}
3+
/** Hello world! */
4+
public class App {
5+
public static void main(String[] args) {
6+
System.out.println("Hello World!");
7+
}
138
}

0 commit comments

Comments
 (0)