GithubHelp home page GithubHelp logo

giraciopide / shellcheck-maven-plugin Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 4.0 114 KB

A maven plugin to execute shellcheck

License: GNU General Public License v3.0

Shell 3.38% Groovy 6.27% Java 90.35%
build maven maven-plugin shellcheck

shellcheck-maven-plugin's People

Contributors

giraciopide avatar

Stargazers

 avatar  avatar

Watchers

 avatar

shellcheck-maven-plugin's Issues

Wrong download URL for arm

There's a typo in the download url for arm: it's an additional '$' in Architecture:112: ...download/v$%s...

Multi module project

Hi,
I am using a maven multi module project and having problems to get the build with shellcheck running.

There are script in the project root folder and in 1 module:

  • project/
    • scripts/*.sh
    • moduleA/src/main/resources/*.sh
    • moduleB
    • moduleC

So I want to add the scripts folder in the parent pom and the src/... folder in the pom of moduleA. This does not work out straight as the entry parent pom drives all modules to look into their folder structure if a scripts/ folder exists. This will fail and a "No input files specified" error is thrown.

How to overcome this? Any suggestions?

Thanks.

Support shellcheck for aarch64

An an Apple Silicon M1 shellcheck-maven-plugin fetches the x86_64 tarball version shellcheck:

[INFO] os arch: [Mac_OS_X-aarch64]
[WARNING] No shellcheck download url provided for current os.name-os.arch [Mac_OS_X-aarch64]
[INFO] shellcheck release will be fetched at [https://github.com/koalaman/shellcheck/releases/download/v0.8.0/shellcheck-v0.8.0.darwin.x86_64.tar.xz]

Correct would be to fetch the aarch64 version of shellcheck, e.g. https://github.com/koalaman/shellcheck/releases/download/v0.10.0/shellcheck-v0.10.0.darwin.aarch64.tar.xz

Skip seems not to work with version 0.5.1

I am using shellcheck-maven-plugin with a configuration using <skip>true</skip>.
While this works fine with shellcheck-maven-plugin 0.4.0 it fails after switching to version 0.5.1 with the following error:

[INFO] --- shellcheck-maven-plugin:0.5.1:check (shell-script-linter) @ ibis-icons ---
[INFO] os arch: [Mac_OS_X-aarch64]
[WARNING] No shellcheck download url provided for current os.name-os.arch [Mac_OS_X-aarch64]
[INFO] shellcheck release will be fetched at [https://github.com/koalaman/shellcheck/releases/download/v0.9.0/shellcheck-v0.9.0.darwin.x86_64.tar.xz]
[WARNING] No signatures were supplied, skipping file validation
[INFO] Got from cache: /paht/to/.m2/repository/.cache/download-maven-plugin/shellcheck-v0.9.0.darwin.x86_64.tar.xz_d0c57f31ae31dba1abbaf4e9652cab4e
[INFO] Expanding: /path/to/skipped/target/shellcheck-plugin/shellcheck-v0.9.0.darwin.x86_64.tar.xz into /path/to/skipped/target/shellcheck-plugin
[WARNING] ------ Shellcheck run [shell-script-linter.0] returned [3] stdout will follow -----------------------------------------
[WARNING] ------ Shellcheck run [shell-script-linter.0] returned [3] stderr will follow -----------------------------------------
[ERROR] No files specified.
[ERROR] 
[ERROR] Usage: shellcheck [OPTIONS...] FILES...
[ERROR]   -a                  --check-sourced            Include warnings from sourced files
[ERROR]   -C[WHEN]            --color[=WHEN]             Use color (auto, always, never)
[ERROR]   -i CODE1,CODE2..    --include=CODE1,CODE2..    Consider only given types of warnings
[ERROR]   -e CODE1,CODE2..    --exclude=CODE1,CODE2..    Exclude types of warnings
[ERROR]   -f FORMAT           --format=FORMAT            Output format (checkstyle, diff, gcc, json, json1, quiet, tty)
[ERROR]                       --list-optional            List checks disabled by default
[ERROR]                       --norc                     Don't look for .shellcheckrc files
[ERROR]   -o check1,check2..  --enable=check1,check2..   List of optional checks to enable (or 'all')
[ERROR]   -P SOURCEPATHS      --source-path=SOURCEPATHS  Specify path when looking for sourced files ("SCRIPTDIR" for script's dir)
[ERROR]   -s SHELLNAME        --shell=SHELLNAME          Specify dialect (sh, bash, dash, ksh)
[ERROR]   -S SEVERITY         --severity=SEVERITY        Minimum severity of errors to consider (error, warning, info, style)
[ERROR]   -V                  --version                  Print version information
[ERROR]   -W NUM              --wiki-link-count=NUM      The number of wiki links to show, when applicable
[ERROR]   -x                  --external-sources         Allow 'source' outside of FILES
[ERROR]                       --help                     Show this usage summary and exit
[ERROR] 
[INFO] ------------------------------------------------------------------------

Looks like the skip flag is ignored.

Please have look.

Thanks, Roman

No embedded binary found for shellcheck with Windows

plugin fails to find embedded binary when run on Windows machines, works fine on Linux.

build fails after this log:

[INFO] os arch: [Windows_10-amd64]
[DEBUG] Detected arch is [Windows_x86]
[DEBUG] Path [\target\shellcheck-plugin\shellcheck.exe] was created? [true]
[DEBUG] Will try to use binary [/shellcheck-bin/Windows_x86/shellcheck-v0.8.0.exe]

Does the binary in the embedded jar have a different name/version?

I'm using plugin version 0.4.0

Exclude target directory

I want to set the sourceDirectory to the root of the project. Unfortunately the direct target dir and also the target dirs of sub-modules are checked.
Maybe it makes sense to add excludes as config params. Or as an alternative or additionally to add a flag to disable traversal of sub-dirs of the sourceDirectories.

The ShellcheckMojo Has Parameters Marked as Read-only

Overview

When running a maven build using the shellcheck-maven-plugin I see the following warnings:

[WARNING] Parameter 'binaryResolutionMethod' is read-only, must not be used in configuration
[WARNING] Parameter 'skip' (user property 'skip.shellcheck') is read-only, must not be used in configuration
[WARNING] Parameter 'sourceDirs' is read-only, must not be used in configuration

When I look in the ShellcheckMojo class I see that the majority of arguments for the plugin are marked as readonly=true.

Is there an alternative approach to setting the arguments or should the readonly flag be relaxed a little?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.