Shellcheck: Windows Distribution.

Created on 24 May 2017  Â·  13Comments  Â·  Source: koalaman/shellcheck

Please add a Windows distribution too.

Thank you.

Most helpful comment

I've convinced TravisCI to build Windows executables by running Wine in Docker (5cece759c). Builds are pushed to GCS.

The latest commit is now available on https://storage.googleapis.com/shellcheck/shellcheck-latest.zip , and I've added this to the readme.

All 13 comments

You can install this on Windows just fine via Cabal:

cabal update
cabal install ShellCheck

You can install this on Windows just fine via Cabal

No, I can't, nor can most windows users :) .

I've had no issues doing that on each of my Windows boxes... Can you explain a little further why that didn't work for you? What have you tried, and what did or didn't work?

@Nightfirecat There's a distribution for each OS, only for Windows there's none.

I haven't asked for yet another package manager that I need to install only to be able to install what I actually needed :) . Also cabal needs to be able to get out throughout corporate firewalls, or users need to learn how to do that too :) .

The distro releases are independently maintained by awesome individuals.

What's the package manager you currently use for Windows?

What's the package manager you currently use for Windows?

There are no widely used package managers for Windows applications, hence the widespread use of installers when distributing them: https://en.wikipedia.org/wiki/List_of_installation_software
Few already used with Haskell too:

If the application consists of a single EXE file (no dependencies), than a simply zip with it will also do it.

@aadrian the Chocolatey project has some traction you can submit a request for a package here.

Though I kind of have a feeling that getting something like that setup may need work from both sides Koalaman and Choco maintainers.

I've convinced TravisCI to build Windows executables by running Wine in Docker (5cece759c). Builds are pushed to GCS.

The latest commit is now available on https://storage.googleapis.com/shellcheck/shellcheck-latest.zip , and I've added this to the readme.

I've convinced TravisCI to build Windows executables by running Wine in Docker

https://www.appveyor.com/ is practically Travis for Widows. It's also free for open source projects.

The latest commit is now available on https://storage.googleapis.com/shellcheck/shellcheck-latest.zip , and I've added this to the readme.

This is fantastic :) !.

Thank you very much!

FWIW you can easily install cabal on windows with https://chocolatey.org/, simply run:

choco install ghc -y

Then you can do

cabal update
cabal install ShellCheck

1. Choice

If you not a Haskell developer:

    Scoop is quick solution — 5.5 MB.

else @theimpostor method:

    you need to install big dependency ghc — 180 MB.

2. Demonstration

C:\Users\SashaChernykh>scoop install shellcheck
Installing 'shellcheck' (0.4.7) [64bit]
shellcheck-v0.4.7.zip (5.5 MB) [==============================================================================] 100%
Checking hash of shellcheck-v0.4.7.zip… ok.
Extracting… done.
Running pre-install script…
Linking ~\scoop\apps\shellcheck\current => ~\scoop\apps\shellcheck\0.4.7
Creating shim for 'shellcheck'.
'shellcheck' (0.4.7) was installed successfully!

C:\Users\SashaChernykh>refreshenv
Refreshing environment variables from registry for cmd.exe. Please wait…Finished..

C:\Users\SashaChernykh>shellcheck
No files specified.

Usage: shellcheck [OPTIONS…] FILES…
  -a                --check-sourced          Include warnings from sourced files
  -C[WHEN]          --color[=WHEN]           Use color (auto, always, never)
  -e CODE1,CODE2..  --exclude=CODE1,CODE2..  Exclude types of warnings
  -f FORMAT         --format=FORMAT          Output format (checkstyle, gcc, json, tty)
  -s SHELLNAME      --shell=SHELLNAME        Specify dialect (sh, bash, dash, ksh)
  -V                --version                Print version information
  -x                --external-sources       Allow 'source' outside of FILES

Thanks.

The linked google storage is dead.

I'll make the same points as above: i don't want to install yet another package manager, which also requires a bunch of other stuff to be installed, so we're up to 5+ programs you have to install just to install shellcheck, and then it's not available to eg vscode by default because of the weird install location.

Choco itself drags in python, and various visual studio dependencies

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nathaniel112 picture nathaniel112  Â·  4Comments

maxisme picture maxisme  Â·  3Comments

mechalynx picture mechalynx  Â·  5Comments

ymkjp picture ymkjp  Â·  3Comments

koalaman picture koalaman  Â·  4Comments