Skip to content

Commit

Permalink
WIP 318 Make HSC CLI type safe
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Sep 18, 2024
1 parent fc5d6b7 commit 7ce3b11
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.aim42.htmlsanitycheck.cli

import groovy.transform.TypeChecked
import org.aim42.htmlsanitycheck.AllChecksRunner
import org.aim42.htmlsanitycheck.Configuration
import org.aim42.htmlsanitycheck.ProductInformation
Expand All @@ -10,6 +11,7 @@ import picocli.CommandLine.Option
import picocli.CommandLine.Parameters

import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.Paths
import java.util.logging.Formatter
import java.util.logging.ConsoleHandler
Expand All @@ -25,6 +27,7 @@ import java.util.logging.SimpleFormatter
description = "Check HTML files for Sanity",
showDefaultValues = true
)
@TypeChecked
class HscCommand implements Runnable {
private static final Logger rootLogger
private static ConsoleHandler consoleHandler
Expand Down Expand Up @@ -109,7 +112,7 @@ class HscCommand implements Runnable {
.filter({ path ->
suffixes.any { suffix -> path.toString().endsWith(".${suffix}") }
})
.collect { it.toFile() }
.collect { Path path -> path.toFile() }
}

static class HscRunner {
Expand Down

0 comments on commit 7ce3b11

Please sign in to comment.