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 class  Shellcheck.Result
    The results of a shellcheck run.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static java.lang.String VERSION  
  • Method Summary

    Modifier and Type Method Description
    static Shellcheck.Result run​(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.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • 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.InterruptedException
      Runs the provided shellcheck binary capturing its output and return code.
      Parameters:
      shellcheckBinary - the binary for shellcheck
      outdir - where the output files will be stored
      scriptsToCheck - 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