Class Shellcheck
java.lang.Object
dev.dimlight.maven.plugin.shellcheck.Shellcheck
public class Shellcheck
extends java.lang.Object
A thin java wrapper over the shellcheck binary for execution.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classShellcheck.ResultThe results of a shellcheck run. -
Field Summary
Fields Modifier and Type Field Description static java.lang.StringVERSION -
Method Summary
Modifier and Type Method Description static Shellcheck.Resultrun(java.nio.file.Path shellcheckBinary, java.nio.file.Path outdir, java.util.List<java.nio.file.Path> scriptsToCheck)Runs the provided shellcheck binary capturing its output and return code.
-
Field Details
-
VERSION
public static final java.lang.String VERSION- See Also:
- Constant Field Values
-
-
Method Details
-
run
public static Shellcheck.Result run(java.nio.file.Path shellcheckBinary, java.nio.file.Path outdir, java.util.List<java.nio.file.Path> scriptsToCheck) throws java.io.IOException, java.lang.InterruptedExceptionRuns the provided shellcheck binary capturing its output and return code.- Parameters:
shellcheckBinary- the binary for shellcheckoutdir- where the output files will be storedscriptsToCheck- the list of arguments to shellcheck- Returns:
- a result object containing exit code and captured outputs (on file)
- Throws:
java.io.IOException- if something goes bad doing io things (writing files etc...)java.lang.InterruptedException- if the thread gets interrupted while waiting for shellcheck to finish
-