Add a shellcheck tool for Review Bot
Review Request #11246 — Created Oct. 26, 2020 and submitted
This adds support for shellcheck through Review Bot. ShellCheck is a
shell script static analysis tool that gives warnings and suggestions
for bash/sh shell scripts.
Configured the tool and ran it manually.
Summary | ID | Author |
---|---|---|
e093d80e68c8beada38b5d29dd7a8190025521ce | ceciliaccwei |
Description | From | Last Updated |
---|---|---|
I noticed that in files where I saw import logging, I also noticed that this was included: logger = logging.getLogger(__name__) … |
jblazusi | |
I believe there should be a trailing ',' here. |
jblazusi | |
I feel like a lot of shell scripts may not have an extension at all. Maybe instead we should look … |
david | |
Let's say "Using a POSIX-sh compatible shell" |
david | |
Please add a period to the end of this comment. |
david | |
A couple comments here: Since we're using regex.search, we shouldn't need to strip the end of the line. Please add … |
david | |
There is an extra line here. |
keanweng | |
I noticed that this call to super() is not compatible with python 2.7, because it expects parameters. I believe that … |
jblazusi | |
Similarily to other reviews, this execute function should be placed inside of a try/except. |
jblazusi |
- Change Summary:
-
Addressed feedback
- Commits:
-
Summary ID Author c88c446a75face72027eacd6a48b45e0a4bdd8fe ceciliaccwei 02f2d13a18733bef63e4f6255d196eeaa6a547ee ceciliaccwei
Checks run (2 succeeded)
- Change Summary:
-
Updated default severity level.
- Commits:
-
Summary ID Author 02f2d13a18733bef63e4f6255d196eeaa6a547ee ceciliaccwei 7aa61a2e0a47c944272fd68171260d46b3d4c7ae ceciliaccwei
Checks run (2 succeeded)
- Change Summary:
-
Detect shell scripts using shebang
- Commits:
-
Summary ID Author 7aa61a2e0a47c944272fd68171260d46b3d4c7ae ceciliaccwei f207aa76000fb7264c3506c0d419930a0da42347 ceciliaccwei
Checks run (2 succeeded)
- Change Summary:
-
Addressed comments.
- Commits:
-
Summary ID Author f207aa76000fb7264c3506c0d419930a0da42347 ceciliaccwei e434dff6b2505e980458646ee786b0e4da3a3190 ceciliaccwei
Checks run (2 succeeded)
-
Ran it manually and it worked great, just one minor issue when used against python 2.7
-
I noticed that this call to
super()
is not compatible with python 2.7, because it expects parameters. I believe that in order for this to be compatible with python 2.7 it should besuper(ShellCheckTool, self).__init__()
. I saw that a similar approach was being done in the JSHint tool.
- Change Summary:
-
Make the super() method python2.7 compatible.
- Commits:
-
Summary ID Author e434dff6b2505e980458646ee786b0e4da3a3190 ceciliaccwei c1a380874f29d891cef5099c4d05a09b278126c5 ceciliaccwei