Code Monkey home page Code Monkey logo

azdo-shellcheck's People

Contributors

azurepipelines avatar beverts312 avatar calebcartwright avatar dependabot[bot] avatar renovate-bot avatar swellbot avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

a2425rdl

azdo-shellcheck's Issues

Add support for JUnit format

ShellCheck does not natively support the JUnit XML format.

Seems the best way to go about adding JUnit support (per ShellCheck docs) is to utilize the checkstyle xml format (i.e. -f checkstyle) and then use an xslt to transform that to JUnit xml format.

Add support for versioned Install on Mac

Description

Support version specification on Mac-based agents (currently only stable can be installed via HomeBrew)

Value

Starting with v0.7.0, the ShellCheck releases include a pre-built binary for Mac, so our task should correspondingly enable that version selection for users

Additional options support

Should allow users to include the additional options supported by ShellCheck, but fall back to default ShellCheck behavior otherwise

  • -x - follow sourced files
  • -f output format (json, xml, etc.)
  • -d dialect (sh/bash/ksh/etc.)
  • -e exclude rules

Edit 1 - Added -e

Dependency Dashboard

This issue provides visibility into Renovate updates and their statuses. Learn more

Other Branches

These updates are pending. To force PRs open, click the checkbox below.

  • chore(deps): update dependency ansi-regex to 5.0.1 [security]
  • chore(deps): update dependency jszip to 3.7.0 [security]
  • chore(deps): update dependency underscore to 1.12.1 [security]

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.


  • Check this box to trigger a request for Renovate to run again on this repository

Add brace expansion support on ShellCheck

Description

Support optional brace expansion on the targetFiles input of the ShellCheck run task

Value

The Azure Pipelines Task Lib supports pattern matching for files from input parameters, but brace expansion is disabled by default due to challenges with escaping on Windows.

Making brace expansion available to users (via a new input option) would allow for leveraging more powerful globs/patterns for specifying target files to run ShellCheck against

ShellCheck reports wrong URL for installation in the Run Shellcheck Task

Environment Details

Description

The Run Task trhows an error saying that shellcheck was installed from the wrong location.

Log Output

Starting: Install ShellCheck
==============================================================================
Task         : Install ShellCheck
Description  : Installs Specified ShellCheck Version
Version      : 0.1.16
Author       : Swellaby
Help         : [More Information](https://github.com/swellaby/azdo-shellcheck)
==============================================================================
Downloading: https://shellcheck.storage.googleapis.com/shellcheck-latest.linux.x86_64.tar.xz
/bin/tar xC /home/vsts/work/_temp/shellcheck-latest -f /home/vsts/work/_temp/a73463fe-8e7c-4efd-a92a-60ed4f18c8d4
Prepending PATH environment variable with directory: /home/vsts/work/_temp/shellcheck-latest/shellcheck-latest
Finishing: Install ShellCheck

Starting: Run ShellCheck
==============================================================================
Task         : ShellCheck
Description  : Run ShellCheck
Version      : 0.3.16
Author       : Swellaby
Help         : [More Information](https://github.com/swellaby/azdo-shellcheck)
==============================================================================
/home/vsts/work/_temp/shellcheck-latest/shellcheck-latest/shellcheck myscripts.sh
You are downloading ShellCheck from the wrong URL!
Please update to the latest one:
https://github.com/koalaman/shellcheck/releases/download/latest/shellcheck-latest.linux.x86_64.tar.xz

For more information, see:
https://github.com/koalaman/shellcheck/issues/1871
##[error]ShellCheck scan failed! Check the logs for violation details.
Finishing: Run ShellCheck
-->

Consider going into maintenance mode (officially) or deprecating

I'm increasingly feeling that we should deprecate this extension, or at least officially mark it is in maintenance-only mode and close the remaining issues (it's been here functionally for at least a year).

The extension provides two pipeline tasks that respectively deliver two capabilities: install a specified version of ShellCheck, run ShellCheck

Thoughts anyone?

Install

In the intervening years since we originally released the extension, ShellCheck has been incorporated into the set of pre-installed software on the Linux agents/runners, so I think that largely obviates our install task for those able to use the Microsoft-hosted pools. Admittedly, it's not on the Mac nor Windows agents, nor does that cover self-hosted agents. However, ShellCheck can be easily grabbed on Mac and Windows using their respective package managers, and the AFAICT the main Linux package managers have relatively up to date versions of ShellCheck these days (wasn't the case back in the day).

Additionally, the install task could be fiddly. I know I've had trouble trying to use it at the day job with pipelines running on agents behind a proxy, to the point that I'd switched our own such pipelines to just use scripts ๐Ÿ˜ฑ @beverts312 correct me if I'm wrong, but I think you also just downloaded/used and ran ShellCheck natively in your pipelines as well right?

Run

The only real utility I see for the task that runs/executes ShellCheck is centered around the recursive file behavior. However, with the big shift to pipeline-as-code and the pending/inevitable decom of the UX/Visual Designer based pipelines it is much more common for devs to be working with their pipelines as code and more easily able to plug scripts in, and the benefits the custom task provided with buttons/navigators in the UX is going away.

It's not that hard to extend the script to run ShellCheck recursively in the Unix like/based environments, so I feel like the recursive behavior benefit largely boils down to Windows, and I just can't see there being a significant population of folks with valid use cases for massive ShellCheck use in a strictly Windows environment ๐Ÿ˜†




Finally, worth noting both that we never saw a ton of market penetration (grand total of 79 installs), and it's also clear at this point that Microsoft/GitHub's energy and focus is on the GitHub Actions space so the ecosystem of potential consumers is only going to continue to decrease

Add support for aarch64 architecture

Description

Include Installer support for aarch64 architecture

Value

Starting with v0.7.0 the pre-compiled binaries for linux includes a target for aarch64, but the Installer task will currently fail on any arch other than arm and x86_64. We should support any architecture that has a corresponding pre-built binary

Add v0.7.0

Description

Add v0.7.0 to to the download task

Value

It's the newest released version, but we only go up to 0.6.0 currently (plus latest and stable)

Install Task error

Environment Details

  • ShellCheck Task
    • Install ShellCheck
      • Version: 0.0.17
    • Run ShellCheck
      • Version:
  • Agent Type
    • Hosted Linux Agent
    • Hosted MacOS Agent
    • Hosted Windows Agent
    • Self-hosted/private Agent
  • Agent Tool Versions
    • Node.js Version:
    • npm version:

Description

Install task is throwing an error due to missing deps (presumably a bundling/packaging issue)

## Log Output
##[section]Starting: Install ShellCheck
==============================================================================
Task         : Install ShellCheck
Description  : Installs Specified ShellCheck Version
Version      : 0.0.17
Author       : Swellaby
Help         : [More Information](https://github.com/swellaby/azdo-shellcheck)
==============================================================================
module.js:471
    throw err;
    ^

Error: Cannot find module 'semver'
    at Function.Module._resolveFilename (module.js:469:15)
    at Function.Module._load (module.js:417:25)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/home/vsts/work/_tasks/install-shellcheck_3f74db91-b37c-4602-bb92-2658c6d136f2/0.0.17/node_modules/azure-pipelines-task-lib/internal.js:10:14)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
##[error]Exit code 1 returned from process: file name '/home/vsts/agents/2.148.2/externals/node/bin/node', arguments '"/home/vsts/work/_tasks/install-shellcheck_3f74db91-b37c-4602-bb92-2658c6d136f2/0.0.17/runner.js"'.
##[section]Finishing: Install ShellCheck

Install error - http 403

Environment Details

  • ShellCheck Task
    • Install ShellCheck
      • Version:
    • Run ShellCheck
      • Version:
  • Agent Type
    • Hosted Linux Agent
    • Hosted MacOS Agent
    • Hosted Windows Agent
    • Self-hosted/private Agent
  • Agent Tool Versions
    • Node.js Version:
    • npm version:

Description

Install task failing with unauthorized error on self-hosted agent behind a proxy

Log Output

Create ShellCheck Installer Task

Currently the run task will auto-install ShellCheck if the bin cannot be found.

We should extract that into a separate tool installer task, which would give users more control over install behavior (including version selection)

Originally, I viewed this as more like a "nice to have" in my opinion vs. a "must-have for 1.x release", however, with the existing auto-install behavior the hosted agents are essentially caching shellcheck once installed which removes the users ability to specify version.

CC @beverts312

Install ShellCheck

Auto-install ShellCheck on supported platforms/architectures if it the executable is not already available

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.