From 731e2eab3dc2ab31ee7f13a5bb8e7243ffe868b1 Mon Sep 17 00:00:00 2001 From: gregk27 Date: Tue, 14 Jan 2025 22:38:41 -0500 Subject: [PATCH 01/11] Add checksytle linter This should make getting consistently-styled code easier. Includes a VSCode extension which shows required changes in the editor as warnings. Current config might be a bit opinionated, can be changed as needed throughout the season --- .vscode/extensions.json | 5 + .vscode/settings.json | 4 +- build.gradle | 13 +++ config/checkstyle/checkstyle.xml | 164 +++++++++++++++++++++++++++++++ 4 files changed, 185 insertions(+), 1 deletion(-) create mode 100644 .vscode/extensions.json create mode 100644 config/checkstyle/checkstyle.xml diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..fcc67e7 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,5 @@ +{ + "recommendations": [ + "shengchen.vscode-checkstyle" + ] +} \ No newline at end of file diff --git a/.vscode/settings.json b/.vscode/settings.json index 612cdd0..f953e76 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -56,5 +56,7 @@ "edu.wpi.first.math.proto.*", "edu.wpi.first.math.**.proto.*", "edu.wpi.first.math.**.struct.*", - ] + ], + "java.checkstyle.configuration": "${workspaceFolder}\\config\\checkstyle\\checkstyle.xml", + "editor.tabSize": 4 } diff --git a/build.gradle b/build.gradle index c6fea4f..58e203f 100644 --- a/build.gradle +++ b/build.gradle @@ -1,6 +1,7 @@ plugins { id "java" id "edu.wpi.first.GradleRIO" version "2025.2.1" + id 'checkstyle' } java { @@ -8,6 +9,18 @@ java { targetCompatibility = JavaVersion.VERSION_17 } +checkstyle { + toolVersion = "10.12.4" +} + +tasks.withType(Checkstyle) { + reports { + xml.required = false + html.required = true + // html.stylesheet = resources.text.fromFile('config/xsl/checkstyle-custom.xsl') + } +} + def ROBOT_MAIN_CLASS = "frc.robot.Main" // Define my targets (RoboRIO) and artifacts (deployable files) diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml new file mode 100644 index 0000000..1881669 --- /dev/null +++ b/config/checkstyle/checkstyle.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 88c0fda34f2148bfc0d8eeecbe462ccb660c9b68 Mon Sep 17 00:00:00 2001 From: gregk27 Date: Tue, 14 Jan 2025 22:40:56 -0500 Subject: [PATCH 02/11] Update generated files to use 4-space indentation --- src/main/java/frc/robot/Main.java | 9 ++- src/main/java/frc/robot/Robot.java | 84 ++++++++++----------- src/main/java/frc/robot/RobotContainer.java | 14 ++-- 3 files changed, 54 insertions(+), 53 deletions(-) diff --git a/src/main/java/frc/robot/Main.java b/src/main/java/frc/robot/Main.java index fe215d7..25fa2ae 100644 --- a/src/main/java/frc/robot/Main.java +++ b/src/main/java/frc/robot/Main.java @@ -7,9 +7,10 @@ import edu.wpi.first.wpilibj.RobotBase; public final class Main { - private Main() {} + private Main() { + } - public static void main(String... args) { - RobotBase.startRobot(Robot::new); - } + public static void main(String... args) { + RobotBase.startRobot(Robot::new); + } } diff --git a/src/main/java/frc/robot/Robot.java b/src/main/java/frc/robot/Robot.java index be21731..dc486ae 100644 --- a/src/main/java/frc/robot/Robot.java +++ b/src/main/java/frc/robot/Robot.java @@ -9,64 +9,64 @@ import edu.wpi.first.wpilibj2.command.CommandScheduler; public class Robot extends TimedRobot { - private Command m_autonomousCommand; + private Command autonomousCommand; - private final RobotContainer m_robotContainer; + private final RobotContainer robotContainer; - public Robot() { - m_robotContainer = new RobotContainer(); - } + public Robot() { + robotContainer = new RobotContainer(); + } - @Override - public void robotPeriodic() { - CommandScheduler.getInstance().run(); - } + @Override + public void robotPeriodic() { + CommandScheduler.getInstance().run(); + } - @Override - public void disabledInit() {} + @Override + public void disabledInit() {} - @Override - public void disabledPeriodic() {} + @Override + public void disabledPeriodic() {} - @Override - public void disabledExit() {} + @Override + public void disabledExit() {} - @Override - public void autonomousInit() { - m_autonomousCommand = m_robotContainer.getAutonomousCommand(); + @Override + public void autonomousInit() { + autonomousCommand = robotContainer.getAutonomousCommand(); - if (m_autonomousCommand != null) { - m_autonomousCommand.schedule(); + if (autonomousCommand != null) { + autonomousCommand.schedule(); + } } - } - @Override - public void autonomousPeriodic() {} + @Override + public void autonomousPeriodic() {} - @Override - public void autonomousExit() {} + @Override + public void autonomousExit() {} - @Override - public void teleopInit() { - if (m_autonomousCommand != null) { - m_autonomousCommand.cancel(); + @Override + public void teleopInit() { + if (autonomousCommand != null) { + autonomousCommand.cancel(); + } } - } - @Override - public void teleopPeriodic() {} + @Override + public void teleopPeriodic() {} - @Override - public void teleopExit() {} + @Override + public void teleopExit() {} - @Override - public void testInit() { - CommandScheduler.getInstance().cancelAll(); - } + @Override + public void testInit() { + CommandScheduler.getInstance().cancelAll(); + } - @Override - public void testPeriodic() {} + @Override + public void testPeriodic() {} - @Override - public void testExit() {} + @Override + public void testExit() {} } diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index de2c9d0..5141a26 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -8,13 +8,13 @@ import edu.wpi.first.wpilibj2.command.Commands; public class RobotContainer { - public RobotContainer() { - configureBindings(); - } + public RobotContainer() { + configureBindings(); + } - private void configureBindings() {} + private void configureBindings() {} - public Command getAutonomousCommand() { - return Commands.print("No autonomous command configured"); - } + public Command getAutonomousCommand() { + return Commands.print("No autonomous command configured"); + } } From 4a5e8ba33447e009be43dfa02b440e0eb8780b1e Mon Sep 17 00:00:00 2001 From: gregk27 Date: Tue, 14 Jan 2025 22:46:49 -0500 Subject: [PATCH 03/11] Add default gradle build action --- .github/workflows/gradle.yml | 48 ++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .github/workflows/gradle.yml diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml new file mode 100644 index 0000000..a07f74a --- /dev/null +++ b/.github/workflows/gradle.yml @@ -0,0 +1,48 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle + +name: Java CI with Gradle + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. + # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md + - name: Setup Gradle + uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + + - name: Build with Gradle Wrapper + run: ./gradlew build + + # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). + # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. + # + # - name: Setup Gradle + # uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 + # with: + # gradle-version: '8.9' + # + # - name: Build with Gradle 8.9 + # run: gradle build \ No newline at end of file From 47f490df3a8c1c775c8cf1d184f3076f56b69c63 Mon Sep 17 00:00:00 2001 From: Gregory Kelly Date: Sat, 18 Jan 2025 00:38:41 -0500 Subject: [PATCH 04/11] Checkstyle action test PR (#1) Create github action configuration needed to use checkstyle as a devops setp --- .github/workflows/gradle.yml | 62 ++++++++++++++++++++++++++++---- build.gradle | 13 ++++++- config/checkstyle/checkstyle.xml | 23 ++++++++---- 3 files changed, 84 insertions(+), 14 deletions(-) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index a07f74a..15683fb 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -7,11 +7,7 @@ name: Java CI with Gradle -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] +on: [push, pull_request] jobs: build: @@ -27,6 +23,10 @@ jobs: with: java-version: '17' distribution: 'temurin' + cache: gradle + + - name: Make Gradlew executable + run: chmod +x ./gradlew # Configure Gradle for optimal use in GitHub Actions, including caching of downloaded dependencies. # See: https://github.com/gradle/actions/blob/main/setup-gradle/README.md @@ -34,7 +34,7 @@ jobs: uses: gradle/actions/setup-gradle@af1da67850ed9a4cedd57bfd976089dd991e2582 # v4.0.0 - name: Build with Gradle Wrapper - run: ./gradlew build + run: ./gradlew build -x checkstyleMain # NOTE: The Gradle Wrapper is the default and recommended way to run Gradle (https://docs.gradle.org/current/userguide/gradle_wrapper.html). # If your project does not have the Gradle Wrapper configured, you can use the following configuration to run Gradle with a specified version. @@ -45,4 +45,52 @@ jobs: # gradle-version: '8.9' # # - name: Build with Gradle 8.9 - # run: gradle build \ No newline at end of file + # run: gradle build + + checkstyle-passfail: + runs-on: ubuntu-latest + needs: build + permissions: + contents: read + checks: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + - name: Make Gradlew executable + run: chmod +x ./gradlew + + - name: Run Checkstyle + run: ./gradlew checkstyleMain + + checkstyle-report: + runs-on: ubuntu-latest + needs: build + permissions: + contents: read + checks: write + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: gradle + + - name: Make Gradlew executable + run: chmod +x ./gradlew + + - name: Run check style + uses: nikitasavinov/checkstyle-action@master + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + reporter: 'github-pr-check' + tool_name: 'testtool' diff --git a/build.gradle b/build.gradle index 58e203f..c50e96c 100644 --- a/build.gradle +++ b/build.gradle @@ -11,11 +11,22 @@ java { checkstyle { toolVersion = "10.12.4" + maxWarnings = 10 + // Run with higher severity on github actions pipeline + if(System.getenv("GITHUB_ACTIONS")){ + configProperties = [ + "severity": "error" + ] + } else { + configProperties = [ + "severity": "warning" + ] + } } tasks.withType(Checkstyle) { reports { - xml.required = false + xml.required = true html.required = true // html.stylesheet = resources.text.fromFile('config/xsl/checkstyle-custom.xsl') } diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index 1881669..3ad19a9 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -8,7 +8,7 @@ - + @@ -72,10 +72,16 @@ - - + + + + + + - + + + @@ -91,8 +97,9 @@ - - + + + @@ -132,6 +139,7 @@ + @@ -146,18 +154,21 @@ + + + From eb0c4237813d8349d6d4dc062ba220def93f6aa6 Mon Sep 17 00:00:00 2001 From: gregk27 Date: Sun, 19 Jan 2025 00:11:50 -0500 Subject: [PATCH 05/11] Add a rough style guide --- config/checkstyle/Style Guide.md | 130 +++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 config/checkstyle/Style Guide.md diff --git a/config/checkstyle/Style Guide.md b/config/checkstyle/Style Guide.md new file mode 100644 index 0000000..2ffdd89 --- /dev/null +++ b/config/checkstyle/Style Guide.md @@ -0,0 +1,130 @@ +# Style Guide + +**Why a style guide?** +Consistent styling is important to make it easier to switch between code written by different people. If we all use different styles, it starts getting harder to quickly understand why a subsystem isn't moving, or how to fix that auto, especially when under pressure at events. + +**Why did we choose X?** +The style guide is generally based on how we've written robot code in the past. None of the rules are truly set in stone between seasons, but generally we limit changes during a season to avoid constantly fixing the code to match. + +**Why the automatic checks?** +The automatic checker (called a Linter) means that you can see whether your code matches the style requirements in real time, and makes it much easier to fix minor issues as they come up. It also makes code review easier, as we don't need to manually nitpick minor style changes when trying to merge in large chunks. + +**Why does Github fail when VSCode builds fine?** The baseline severity in VSCode is set to warning, to avoid minor style errors causing stress during limited testing time or at competition. It is raised to error on Github to make sure sure code gets the extra checks before merging it. + +## Indentation +Indentation is standardized at 4 spaces (VSCode will automatically do this when you press tab). Standardizing indentation ensures that code copied between files will always be properly indented, and code within a file will be easier to read. 4 spaces was chosen as it's the standard for most Java styleguides. + +## Block Statements +Block statements (if, for, while) are written with the opening curly brace on the same line, and the closing curly brace on it's own line. + +Else/else if statements should start on the same line as the closing bracket. A space is required before the else keyword. No requirements exist for spacing around the parentheses (yet). + +```java +if (i == 0) { + // Do Stuff +} else if (i == 1) { + // Other Stuff +} +``` + +Inline if statements are allowed if they are on a single line. If the code is long enough that it should be wrapped, brackets must bet added. While this is annoying, it greatly reduces the potential for errors to be made later when editing that code + +```java +// Bad +if (i == 0) + i++; +// OK +if (i == 0) i++; +// Good +if (i == 0){ + i++; +} +``` + +## Naming +Consistent naming is one of the most important parts of styling. When things are named right, it's much easier to find what you need and understand what you're reading. + +### Classes +Classes, Enums, and other types should be named with `UpperCamelCase` (also called `PascalCase`). The first letter is capitalized, as well as the first letter of each word. No underscores should be used. + +Subsystem classes should be named after the mechanism (e.g. `Drivetrain`, `Intake`) + +Commands should be suffixed with `Command` (e.g. `DriveCommand`, `IntakeCommand`) + +Often, commands which do something automatically are named with both an `Auto` prefix and `Command` suffix (e.g. `AutoDriveCommand`, `AutoIntakeCommand`). This is less of a requirement, but helps keep things easy to understand. + +### Constants +Constants are variables defined as `final` or `static final`. They are used to store data which doesn't change while running, such as physical properties. + +To make it clear that a variable is a constant, it should be named with `CAPITAL_CASE`. All letters are capitalized, and words are separated by underscores. + +Constants may also be prefixed with a `k`, as for some reason the scientific community has decided that `k` stands for konstant. This is generally seen in constants use for physics equations like `kP`, `kI`, `kD`, `kG`. + +### All other variables +All other variables (members, locals, parameters) should be named with `camelCase`. The first letter is lowercase, and the first letter of each following word is capitalized. There are no undescores. + +### Unused formats +We don't use `snake_case`, for anything, it's mostly a python/embedded style. + +While the docs often prefix variables with `m_`, we don't use it as there isn't that much conflict between member and local variables in robot code. + +## Whitespace +### Tokens +Some tokens should not be preceeded by whitespace. Commas, colons, and semicolons should be placed immediately following the previous character. This rule also applies to the `++` and `--` operators. + +Typecasts are written in a way that minimizes whitespace inside parentheses. (e.g. `(int)f` instead of `( int ) f`. `(int) f` is acceptable) + +### Functions +Parentheses for function declarations and calls are placed next to the name without whitespace. (e.g. `func()` is correct, `func ()` is incorrect) + +### Declarations +Declarations in a class should be separated by one or more blank lines. This pads things out a bit so it's easier to read. You can put multiple variable declarations back-to-back, and it's up to the programmer to space them out based on context. + +```java +// Variables grouped together +int kI; +int kP; +int kD; + +//Blank line before/between functions +public void func() { + +} + +public void func2() { + +} +``` + +## String re-use +If the same string is used 3 or more times, in a file, then a dedicated constant should be created for it. This ensures that if can't be changed in one place while missing another. + +The strings `"\n"` and `"\t"` are excempt from this rule. + +## Misc +Only one statement is on a line (e.g. `a = 0; b = 1;` should be split across two lines) + +Semicolons should not be placed following a closing curly bracket. + +Annotations (`@Override`) are placed above the corresponding declaration, with one annotation per line. + +The `x` and `b` in literals are lowercase (e.g. `0xBEEF`, `0b101010`) + +Array brackets are placed directly next to the type, not variable (e.g. `int[] arr`) + +## Footguns +These rules will be treated like errors if broken, since they're checking for things that likely *are* mistakes. + +### Empty inline if statements +An if statement in the format `if(stmt);` without a condition before the semicolon is very likely a typo where the semicolon should be after the next line. If you do want an empty if statement, write it like `if(stmt) {}` instead. + +### Switch break/default +Switch conditions must end with a `break` statement, preventing accidental fallthrough. If you do want a fallthrough, just place a `// fallthrough` comment on the last line. + +The `default` case of a switch must be the last case, as nothing after it will be run. Java allows you to do this, but it's really just a footgun. + +### Assignment in if/while statements +While there are a few reasons to have an assignment in an if/while statement (`if (a = b)`), you almost certainly wanted the comparison (`if (a == b)`) + +### String equality +Java lets you compare strings with `a == b`, but that's prone to giving the wrong behaviour. Instead use `a.equals(b)`. \ No newline at end of file From 0e987ec938c1e271dace005a5a5583633067ff19 Mon Sep 17 00:00:00 2001 From: gregk27 Date: Sun, 19 Jan 2025 00:26:19 -0500 Subject: [PATCH 06/11] Create PR template --- .github/pull_request_template.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..8401a78 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,17 @@ +## Changes +Description of your changes + +Include refernces to any issues you address, using closing words if they're resolved. + +## Testing +- [ ] Tested in Simulation (remove if not applicable) +- [ ] Tested on Robot + +Describe your testing here + + +## Checklist +- [ ] Code Builds +- [ ] Checkstyle Passes +- [ ] Code generates no new warnings +- [ ] Appropriately tested From 7c2554a4aa14f17637644765338660f012ab1f0c Mon Sep 17 00:00:00 2001 From: gregk27 Date: Sun, 19 Jan 2025 01:01:32 -0500 Subject: [PATCH 07/11] Add CODEOWNERS file to make sure accidental changes to touchy config files require extra review --- .github/CODEOWNERS | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/CODEOWNERS diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..5e773a9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,7 @@ +# All files in root dir and folders starting with . +# Mostly just protecting the touchy configuration things +/*.* @LakeEffectRobotics/RepoLord +config/checkstyle/** @LakeEffectRobotics/RepoLord + +# Optionally could add individual owners for source files below +# But would require them to review all PRs on those files \ No newline at end of file From f0b3090104da693c581f2c454aed7772a93ba984 Mon Sep 17 00:00:00 2001 From: Gregory Kelly Date: Sun, 19 Jan 2025 01:05:07 -0500 Subject: [PATCH 08/11] Update CODEOWNERS --- .github/CODEOWNERS | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5e773a9..5ea44a8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,7 +1,7 @@ # All files in root dir and folders starting with . # Mostly just protecting the touchy configuration things -/*.* @LakeEffectRobotics/RepoLord -config/checkstyle/** @LakeEffectRobotics/RepoLord +/*.* @LakeEffectRobotics/repolord +config/checkstyle/** @LakeEffectRobotics/repolord # Optionally could add individual owners for source files below -# But would require them to review all PRs on those files \ No newline at end of file +# But would require them to review all PRs on those files From c1726d8e3c884c75aee40e392410773ffa3cee3d Mon Sep 17 00:00:00 2001 From: Gregory Kelly Date: Sun, 19 Jan 2025 11:43:49 -0500 Subject: [PATCH 09/11] Change Codeowners to Reviewer group --- .github/CODEOWNERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 5ea44a8..32d25cc 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,7 +1,7 @@ # All files in root dir and folders starting with . # Mostly just protecting the touchy configuration things -/*.* @LakeEffectRobotics/repolord -config/checkstyle/** @LakeEffectRobotics/repolord +/*.* @LakeEffectRobotics/reviewer +config/checkstyle/** @LakeEffectRobotics/reviewer # Optionally could add individual owners for source files below # But would require them to review all PRs on those files From 6511f86ecf6567168465c0cc6648c30f17b496b8 Mon Sep 17 00:00:00 2001 From: Gregory Kelly Date: Sun, 19 Jan 2025 11:53:14 -0500 Subject: [PATCH 10/11] Fix checktyle report Now uses correct configuration file --- .github/workflows/gradle.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index 15683fb..c96aaea 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -94,3 +94,4 @@ jobs: github_token: ${{ secrets.GITHUB_TOKEN }} reporter: 'github-pr-check' tool_name: 'testtool' + checkstyle_config: 'config/checkstyle/checkstyle.xml' From 1aba9c2cd23576571779e999f051f7a7e7d45f80 Mon Sep 17 00:00:00 2001 From: gregk27 Date: Sun, 19 Jan 2025 12:22:59 -0500 Subject: [PATCH 11/11] Add propreties file for github action --- .github/workflows/gradle.yml | 1 + config/checkstyle/github.properties | 1 + 2 files changed, 2 insertions(+) create mode 100644 config/checkstyle/github.properties diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index c96aaea..7ac0dd9 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -95,3 +95,4 @@ jobs: reporter: 'github-pr-check' tool_name: 'testtool' checkstyle_config: 'config/checkstyle/checkstyle.xml' + properties_file: 'config/checkstyle/github.properties' diff --git a/config/checkstyle/github.properties b/config/checkstyle/github.properties new file mode 100644 index 0000000..dcc7c8e --- /dev/null +++ b/config/checkstyle/github.properties @@ -0,0 +1 @@ +severity=error \ No newline at end of file