Class PluginPaths
java.lang.Object
dev.dimlight.maven.plugin.shellcheck.PluginPaths
public class PluginPaths
extends java.lang.Object
Utilities for paths related to the plugin.
-
Constructor Summary
Constructors Constructor Description PluginPaths(java.nio.file.Path mavenTargetDirectory) -
Method Summary
Modifier and Type Method Description java.nio.file.PathgetPathInPluginOutputDirectory(java.lang.String... pathFragments)java.nio.file.PathgetPluginOutputDirectory()java.nio.file.PathguessUnpackedBinary(java.nio.file.Path fromPath, Architecture arch)Walks the files in fromPath to find what is likely the shellcheck binary.
-
Constructor Details
-
PluginPaths
public PluginPaths(java.nio.file.Path mavenTargetDirectory)
-
-
Method Details
-
getPluginOutputDirectory
public java.nio.file.Path getPluginOutputDirectory()- Returns:
- a subdir of the current project target that is dedicated to output of this process.
-
getPathInPluginOutputDirectory
public java.nio.file.Path getPathInPluginOutputDirectory(java.lang.String... pathFragments)- Parameters:
pathFragments- the path fragments within the plugin output directory.- Returns:
- a path in the plugin output directory.
-
guessUnpackedBinary
public java.nio.file.Path guessUnpackedBinary(java.nio.file.Path fromPath, Architecture arch) throws java.io.IOExceptionWalks the files in fromPath to find what is likely the shellcheck binary. This is done cause the windows released archive has a different structure (directory and binary-name wise).No actual check inspecting the binary is done, the likely binary is "found" only by name.
- Parameters:
fromPath- the root path from which to start the search.arch- the current detected architecture- Returns:
- the path to the binary, if found
- Throws:
java.io.FileNotFoundException- if the binary is not foundjava.io.IOException- if the there is an IO problem while walking the filesystem
-