You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 8, 2021. It is now read-only.
I would like to add a tool called shellcheck to lint shell scripts before we merge them into master.
At the moment, the tool finds toe following issues:
$ find . -type f -name '*.sh' -exec shellcheck -s bash {} \;
In ./authorized_keys_command.sh line 8:
[ -f /etc/aws-ec2-ssh.conf ] && . /etc/aws-ec2-ssh.conf
^-- SC1091: Not following: /etc/aws-ec2-ssh.conf was not specified as input (see shellcheck -x).
In ./authorized_keys_command.sh line 13:
: ${ASSUMEROLE:=""}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 4:
[ -f /etc/aws-ec2-ssh.conf ] && . /etc/aws-ec2-ssh.conf
^-- SC1091: Not following: /etc/aws-ec2-ssh.conf was not specified as input (see shellcheck -x).
In ./import_users.sh line 7:
: ${DONOTSYNC:=0}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 17:
: ${IAM_AUTHORIZED_GROUPS:=""}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 20:
: ${LOCAL_MARKER_GROUP:="iam-synced-users"}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 23:
: ${LOCAL_GROUPS:=""}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 29:
: ${SUDOERSGROUP:=""}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 34:
: ${SUDOERS_GROUPS:="${SUDOERSGROUP}"}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 39:
: ${ASSUMEROLE:=""}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 42:
: ${USERADD_PROGRAM:="/usr/sbin/useradd"}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 45:
: ${USERADD_ARGS:="--create-home --shell /bin/bash"}
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 78:
aws --region $REGION ec2 describe-tags \
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 95:
for group in $(echo ${IAM_AUTHORIZED_GROUPS} | tr "," " "); do
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 126:
aws --region $REGION ec2 describe-tags \
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 166:
if [[ ! "${username}" =~ ^[0-9a-zA-Z\._\-]{1,32}$ ]]
^-- SC1001: This \- will be a regular '-' in this context.
In ./import_users.sh line 178:
${USERADD_PROGRAM} ${USERADD_ARGS} "${username}"
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 179:
/bin/chown -R "${username}:${username}" "$(eval echo ~$username)"
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 250:
intersection=$(echo ${local_users} ${iam_users} | tr " " "\n" | sort | uniq -D | uniq)
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
In ./import_users.sh line 251:
removed_users=$(echo ${local_users} ${intersection} | tr " " "\n" | sort | uniq -u)
^-- SC2086: Double quote to prevent globbing and word splitting.
^-- SC2086: Double quote to prevent globbing and word splitting.
If there are no doubts, I would like to activate the tool and I would also fix the existing findings.
The text was updated successfully, but these errors were encountered:
Hi,
I would like to add a tool called shellcheck to lint shell scripts before we merge them into master.
At the moment, the tool finds toe following issues:
If there are no doubts, I would like to activate the tool and I would also fix the existing findings.
The text was updated successfully, but these errors were encountered: