Commit Graph

995 Commits

Author SHA1 Message Date
Vidar Holen 08d2eef411 Whitelist docker for SC2016 about '$var'. Fixes #1161 2018-03-29 19:27:34 -07:00
Vidar Holen de257a6cf3
Merge pull request #1164 from Lin-Buo-Ren/improve-snap-package
Improve snap packaging
2018-03-29 11:49:26 -07:00
林博仁(Buo-Ren Lin) 68c24925bc Add info on connecting to removable-media interface in snap description
Signed-off-by: 林博仁(Buo-Ren Lin) <Buo.Ren.Lin@gmail.com>
2018-03-29 23:47:59 +08:00
林博仁(Buo-Ren Lin) 366dc5d3f8 Add snap install instructions to README
Currently shellcheck is only provided by the edge channel, should remove the --channel argument after it is in candidate/stable.

Signed-off-by: 林博仁(Buo-Ren Lin) <Buo.Ren.Lin@gmail.com>
2018-03-29 20:24:31 +08:00
林博仁(Buo-Ren Lin) 1ed743e410 Add snapcraft generated files to the Git tracking ignore rules
This patches uses the following gitignore syntax so that only entries in the root folder is ignored, it is suggested to apply it to existing rules as well.

```
A leading slash matches the beginning of the pathname. For
example, "/*.c" matches "cat-file.c" but not
"mozilla-sha1/sha1.c".
```

Refer-to: gitignore(5) manpage
Signed-off-by: 林博仁(Buo-Ren Lin) <Buo.Ren.Lin@gmail.com>
2018-03-29 20:05:52 +08:00
林博仁(Buo-Ren Lin) 9a2aad16ad Add removable-media plug so that scripts in removable media can be checked
Otherwise it will be blocked by Apparmor with the following message:

```
$ shellcheck script
audit: type=1400 audit(TIMESTAMP): apparmor="DENIED" operation="open" profile="snap.shellcheck.shellcheck" name=2F6D656469612F4C696E2D42756F2D52656E2F57696E646F7773205553422F717569636B72756E pid=10175 comm="shellcheck" requested_mask="r" denied_mask="r" fsuid=FSUID ouid=OUID
script: script: openBinaryFile: permission denied (Permission denied)
```

NOTE:

* This plug is not Auto-connect plug, it has to be manually connected by user with `snap connect shellcheck:removable-media :removable-media`
* Currently files under /mnt is not checkable as snapd doesn't provide an interface for it for now.

Refer-to: Interfaces reference - Snaps are universal Linux packages <https://docs.snapcraft.io/reference/interfaces>
Signed-off-by: 林博仁(Buo-Ren Lin) <Buo.Ren.Lin@gmail.com>
2018-03-29 20:00:23 +08:00
Vidar Holen 177cb10daa Enable strict mode with home access 2018-03-28 18:26:16 -07:00
Vidar Holen 4aca1ff128 Warn when printf arg count is not a multiple of format count 2018-03-28 08:57:38 -07:00
Vidar Holen ffed7caff4 quickrun script now works with new source layout 2018-03-28 08:57:38 -07:00
Vidar Holen ef28200199
Merge pull request #1159 from geirha/patch-1
Consider type a valid command in sh
2018-03-27 11:38:07 -07:00
Geir Hauge 55216792c9
Consider type a valid command in sh
[type](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/type.html) *is* defined by POSIX, and even the bourne shell has the `type` command.
2018-03-25 12:11:57 +02:00
Vidar Holen 51e115cf47 Attempt to fix snap build 2018-03-24 17:43:32 -07:00
Vidar Holen 764b242f1b Suggest quoting expansions in for loop globs 2018-03-24 17:43:20 -07:00
Vidar Holen c3b606c68a Encourage users to use stable rather than latest 2018-03-21 17:55:21 -07:00
Vidar Holen 9f53109dfa Fix tagging of 'stable' 2018-03-21 17:54:36 -07:00
Vidar Holen 795a881219 Fix docker image workdir and add test 2018-03-21 09:39:06 -07:00
Vidar Holen 6dd5350e3b
Merge pull request #1143 from pratikmallya/simplify_dockerbuild
Simplify Dockerfile
2018-03-20 22:31:36 -07:00
Vidar Holen a5b359591c
Merge branch 'master' into simplify_dockerbuild 2018-03-20 22:31:21 -07:00
Vidar Holen 966194e387 Merge branch 'pratikmallya-simplify_dockerbuild' 2018-03-20 22:10:24 -07:00
Vidar Holen 71bcc80c2f Allow more Docker build caching 2018-03-20 22:09:13 -07:00
Vidar Holen 48616225b3
Merge pull request #1147 from tdmalone/patch-1
README - Travis script for updating shellcheck ver
2018-03-20 19:28:39 -07:00
Tim Malone 99276cb9f5
README - Travis script for updating shellcheck ver
Shellcheck in default Travis builds is currently a version behind
2018-03-19 11:15:28 +11:00
Pratik Mallya f769d4e92c Add TravisCI Build Status file 2018-03-15 23:13:54 -05:00
Pratik Mallya 71df01c00f Simplify Dockerfile
Use multi stage Dockerfile to greatly simplify build.
2018-03-15 23:12:28 -05:00
Vidar Holen 5364701914 Merge branch 'simplify_dockerbuild' of https://github.com/pratikmallya/shellcheck into pratikmallya-simplify_dockerbuild 2018-03-15 09:53:50 -07:00
Vidar Holen fb97aca5a6
Merge pull request #1140 from phadej/src
Move library into src/
2018-03-15 16:52:26 +00:00
Pratik Mallya 6b81a9924c Simplify Dockerfile
Use multi stage Dockerfile to greatly simplify build.
2018-03-14 21:43:34 -05:00
Oleg Grenrus cd7c077ecc Move library into src/ 2018-03-08 19:57:40 +02:00
Oleg Grenrus b33607b048 Add custom-setup stanza and containers lowerbound
custom-setup:

- http://cabal.readthedocs.io/en/latest/developing-packages.html#custom-setup-scripts
- https://www.well-typed.com/blog/2015/07/cabal-setup-deps/

Bounds:
- containers-0.5 is required if Data.Map.Strict
- parsec-3.0 for Text.Parsec
- json-0.3.6 for makeObj
2018-03-08 19:35:50 +02:00
Vidar Holen 969230f171 MacPorts version appears unmaintained. Remove from docs. 2018-03-08 08:48:03 -08:00
Vidar Holen a98d69f4ff Update CHANGELOG with $var[ and here doc expansion fixes 2018-03-04 15:42:52 -08:00
Vidar Holen f71c142a44 Don't ignore parse failures in here documents. Fixes #1135. 2018-03-04 15:24:04 -08:00
Vidar Holen 9dfcf54f10 Functionality for emitting parse errors but still continue 2018-03-04 14:42:47 -08:00
Vidar Holen c8cd9dd09c Add a debugParseScript for development 2018-03-03 15:36:50 -08:00
Vidar Holen 8b8aeb4409 Rephrase SC2069 (cmd 2>&1 > file) and make it a warning. Fixes #633 2018-03-03 13:33:24 -08:00
Vidar Holen ee354ffce8 POSIX warning for export -[^p]. Fixes #1130. 2018-02-27 20:38:02 -08:00
Vidar Holen 9fc3ddf849 Fix SC1087 to trigger on any $var[, not just $var[@] 2018-02-25 18:25:47 -08:00
Vidar Holen ecb9d07f52 Update changelog with associative arrays in (()) fix 2018-02-25 18:15:55 -08:00
Vidar Holen d16bf41c3d Better support arrays in arithmetic contexts. Fixes #1074 2018-02-25 18:08:38 -08:00
Vidar Holen 8d5e3a80ae
Merge pull request #1123 from jonhiggs/check-for-which-usage
Check for calls to `which`.
2018-02-25 17:08:37 -08:00
Vidar Holen 34e0fa53c8
Merge pull request #1125 from jonhiggs/nextnumber-macos-support
MacOS support for nextnumber
2018-02-25 17:08:15 -08:00
Jon Higgs 7fb27310e1 Rely upon /usr/bin/env to find bash
This allows you to use the homebrew install Bash 4 on MacOS systems. It
should compatible with most if not all modern Linux distros.
2018-02-26 11:24:09 +11:00
Jon Higgs 00d3c09ddb Raise error unless interpreter supports globstar 2018-02-26 11:23:42 +11:00
Jon Higgs e8fc09414a Check for calls to `which`.
Favour the builtin `command -v` instead.
2018-02-26 10:00:25 +11:00
Vidar Holen b7a8b090d2 SC2229: Warn about 'read $var' 2018-02-25 13:47:58 -08:00
Vidar Holen 72044a79c6 Update changelog 2018-02-25 13:47:58 -08:00
Vidar Holen 6511dc0246 Add missing import 2018-02-25 13:29:06 -08:00
Vidar Holen 740441f2c4
Merge pull request #1121 from PeterDaveHello/update-travis-ci-doc
[Docs] Update Travis CI part in README.md
2018-02-25 11:37:00 -08:00
Peter Dave Hello b311563421 Update Travis CI part in README.md 2018-02-20 04:52:12 +08:00
Vidar Holen 6d257bfa17 Warn about 'while!' and 'while:' 2018-02-17 21:58:29 -08:00