Skip to content

Commit

Permalink
Updated pre-commit scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
rpanman-sonatype committed Feb 17, 2024
1 parent 47fc073 commit 753319f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
7 changes: 3 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
exclude: 'approved.txt$|.svg$|gradlew' # approved excluded to prevent tests from failing, SVGs are auto-generated by the pipeline
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.1.0
exclude: ^*.approved.txt$
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
Expand All @@ -13,12 +12,12 @@ repos:
- id: check-added-large-files

- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
rev: v2.2.0
rev: v2.12.0
hooks:
- id: pretty-format-java
args: [--autofix, --aosp]

- repo: https://github.com/jumanjihouse/pre-commit-hooks
rev: 2.1.5 # or specific git tag
rev: 3.0.0 # or specific git tag
hooks:
- id: shellcheck
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id 'org.sonatype.gradle.plugins.scan' version '2.7.0'
id "base"
id "jacoco"
id "java"
id "java"
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
package org.sonatype.cs.metrics;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;

import org.approvaltests.Approvals;
import org.approvaltests.namer.NamedEnvironment;
import org.approvaltests.namer.NamerFactory;
Expand All @@ -17,13 +21,10 @@
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;

import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.fail;


// https://spring.io/guides/gs/testing-web/
@SpringBootTest(
Expand Down

0 comments on commit 753319f

Please sign in to comment.