Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Google Shell Style Compliance #326

Closed

Conversation

mohitsaxenaknoldus
Copy link
Contributor

Put an x into the box if that apply:

  • This PR introduces breaking change.
  • This PR fixes a bug.
  • This PR adds new functionality.
  • This PR enhances existing functionality.

Description of your changes

This PR only contains small non-breaking changes. I'll create another PR which will require some careful testing.
#324

How can we test changes

hooks/_common.sh Outdated Show resolved Hide resolved
local -r hook_config="$1"
local args
read -r -a args <<< "$2"
read -r -a args <<<"$2"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whitespace reduction changes is what shellcheck GH action refuses to accept.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you please pet linter by reverting such whitespace change along with fix other linter errors and warnings.

hooks/infracost_breakdown.sh Outdated Show resolved Hide resolved
hooks/terragrunt_fmt.sh Outdated Show resolved Hide resolved
@@ -6,7 +6,7 @@ set -eo pipefail
# Arguments:
# script_dir - absolute path to hook dir location
#######################################################################
function common::initialize {
common::initialize() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name() to function name change was an effort by @MaxymVlasov
Please negotiate this with Max.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, please return function word. Google style guide do not determine which syntax should be used

About () - not sure is it needed. It looks like apendix, during bash not be able to achieve function function_name(var1, var2)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, George mentined that () will not works within function
#326 (comment)

@@ -6,7 +6,7 @@ set -eo pipefail
# Arguments:
# script_dir - absolute path to hook dir location
#######################################################################
function common::initialize {
common::initialize() {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, please return function word. Google style guide do not determine which syntax should be used

About () - not sure is it needed. It looks like apendix, during bash not be able to achieve function function_name(var1, var2)

Comment on lines +9 to +17
#######################################
# main function
# Globals:
# ARGS
# HOOK_CONFIG
# SCRIPT_DIR
# Arguments:
# None
#######################################
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Too obvious. Not needed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants