Skip to content

Commit

Permalink
increase logging, ignore utilites
Browse files Browse the repository at this point in the history
  • Loading branch information
kernelsam committed May 13, 2024
1 parent 14fc0ef commit 1d6c109
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/workflows/google-java-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ jobs:
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LOG_LEVEL: DEBUG
# only lint new and modified files
VALIDATE_ALL_CODEBASE: true
VALIDATE_GOOGLE_JAVA_FORMAT: true
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@
<artifactId>clover-maven-plugin</artifactId> <!-- maven-clover2-plugin for version <= 4.0.6 -->
<version>4.5.2</version>
<configuration>
<excludes>
<exclude>**/Utilities.java</exclude>
</excludes>
<targetPercentage>80%</targetPercentage>
</configuration>
<executions>
Expand Down
2 changes: 0 additions & 2 deletions src/main/java/com/senzing/g2/engine/Utilities.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,12 @@ public static String jsonEscape(String string) {
int escapeCount = 0;
for (int index = 0; index < string.length(); index++) {
char c = string.charAt(index);
// CLOVER:OFF
escapeCount += switch (c) {
case '\b','\f','\n','\r','\t','"','\\':
yield 1;
default:
yield (c < ' ') ? 6 : 0;
};
// CLOVER:ON
}
if (escapeCount == 0) return "\"" + string + "\"";
StringBuilder sb = new StringBuilder(string.length() + escapeCount + 2);
Expand Down

0 comments on commit 1d6c109

Please sign in to comment.