Skip to content

Commit

Permalink
shellcheck fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
meyertst-aws committed Jun 6, 2024
1 parent 32a1a05 commit 330f090
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
4 changes: 3 additions & 1 deletion aws-cli/bash-linux/.shellcheckrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Look for 'source'd files relative to the checked script.
source-path=SCRIPTDIR
source-path=SCRIPTDIR/..
source-path=aws-cli/bash-linux/s3/bucket-lifecycle-operations
source-path=aws-cli/bash-linux/s3/bucket-lifecycle-operations
source-path=aws-cli/bash-linux/s3/bucket-lifecycle-operations
external-sources=true
1 change: 0 additions & 1 deletion aws-cli/bash-linux/dynamodb/dynamodb_operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#
###############################################################################


source ./awsdocs_general.sh

# snippet-start:[aws-cli.bash-linux.dynamodb.CreateTable]
Expand Down
2 changes: 1 addition & 1 deletion aws-cli/bash-linux/ec2/awsdocs_general.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

VERBOSE=false
# snippet-start:[aws-cli.bash-linux.ec2.errecho]
###############################################################################
# function errecho
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0


###############################################################################
# function run_test
#
Expand Down Expand Up @@ -116,8 +117,7 @@ function generate_random_name() {
local diff
diff=$((9999 - 1000 + 1))

local i
for i in {1..4}; do
for _ in {1..4}; do
local rnd
rnd=$(($((RANDOM % diff)) + X))
# Make sure that the number is 4 digits long.
Expand All @@ -133,6 +133,9 @@ function generate_random_name() {
###############################################################################
function main() {
echo "Hello world"
verbose=false
interactive=false

}

# bashsupport disable=BP5001
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function main() {

# Set default values.
interactive=false
local verbose=false
verbose=false

# Retrieve the calling parameters.
while getopts "ivh" option; do
Expand Down
1 change: 1 addition & 0 deletions aws-cli/bash-linux/ec2/get_started_with_ec2_instances.sh
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,7 @@ function main() {
get_input_result=""
export
list_result=()
mock_input_array=()

get_started_with_ec2_instances
}
Expand Down

0 comments on commit 330f090

Please sign in to comment.