Skip to content

Commit bfc324e

Browse files
Test
0 parents  commit bfc324e

File tree

7 files changed

+62
-0
lines changed

7 files changed

+62
-0
lines changed

build.gradle.kts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
plugins {
2+
id("java")
3+
checkstyle
4+
}
5+
6+
group = "org.example"
7+
version = "1.0-SNAPSHOT"
8+
9+
checkstyle {
10+
toolVersion = "9.3"
11+
}
12+
13+
14+
repositories {
15+
mavenCentral()
16+
}
17+
18+
dependencies {
19+
testImplementation(platform("org.junit:junit-bom:5.9.1"))
20+
testImplementation("org.junit.jupiter:junit-jupiter")
21+
}
22+
23+
tasks.test {
24+
useJUnitPlatform()
25+
}

gradle/wrapper/gradle-wrapper.jar

59.3 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#Thu Jan 18 14:41:39 CET 2024
2+
distributionBase=GRADLE_USER_HOME
3+
distributionPath=wrapper/dists
4+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

lefthook.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
min_version: 1.1.4
2+
3+
pre-commit:
4+
parallel: true
5+
commands:
6+
check-javadocs:
7+
tags: check javadocs
8+
root: backend/
9+
run: ./gradlew checkstyleMain -include=$(echo {staged_files} | sed 's/ /,/g') && git add {staged_files}

settings.gradle.kts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
rootProject.name = "enforce-java-docs"
2+

src/main/java/org/example/Main.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.example;
2+
3+
/**
4+
* The main class
5+
*/
6+
public class Main {
7+
public static void main(String[] args) {
8+
System.out.println("Hello world!");
9+
}
10+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package org.example;
2+
3+
4+
public class Something {
5+
6+
public String doSth(int test) {
7+
System.out.println("Do sth");
8+
return "test";
9+
}
10+
}

0 commit comments

Comments
 (0)