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

Add make target help #1953

Closed
wants to merge 4 commits into from
Closed

Add make target help #1953

wants to merge 4 commits into from

Conversation

joergdw
Copy link
Contributor

@joergdw joergdw commented Jul 12, 2023

No description provided.

@joergdw joergdw added the 🚧🛠️ WIP📝 Work in progress label Jul 12, 2023
done
}

function print_help_for_parameters () {
Copy link
Contributor

Choose a reason for hiding this comment

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

📝 [shellcheck] reported by reviewdog 🐶
The mentioned syntax error was in this function. SC1009

done
}

function print_help_for_parameters () {
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
Couldn't parse this brace group. Fix to allow more checks. SC1073


function print_help_for_parameters () {
# TODO
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
You need at least one command here. Use 'true;' as a no-op. SC1055


function print_help_for_parameters () {
# TODO
}
Copy link
Contributor

Choose a reason for hiding this comment

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

🚫 [shellcheck] reported by reviewdog 🐶
Unexpected keyword/token. Fix any mentioned problems and try again. SC1072

do
local -a pd=("${param_desc[@]}")
local param=${pd[0]}
echo "!!!pd=${pd}"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

@sonarcloud
Copy link

sonarcloud bot commented Jul 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

}

function describe_all_parameters () {
local -a param_desc_list=("$@")
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Elements in associative arrays need index, e.g. array=( [index]=value ) . SC2190

}

function print_help_for_parameters () {
local -A -r -n param_desc_list=$@
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Variable was used as an array but is now assigned a string. SC2178

}

function print_help_for_parameters () {
local -A -r -n param_desc_list=$@
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Assigning an array to a string! Assign as array, or use * instead of @ to concatenate. SC2124

if [ "${0}" = "${BASH_SOURCE[0]}" ]
then
# TODO: Try associative array: <https://stackoverflow.com/a/3113285>
declare -A -r input=("$@")
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Elements in associative arrays need index, e.g. array=( [index]=value ) . SC2190

then
# TODO: Try associative array: <https://stackoverflow.com/a/3113285>
declare -A -r input=("$@")
echo "${input}"
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ [shellcheck] reported by reviewdog 🐶
Expanding an array without an index only gives the first element. SC2128

@joergdw
Copy link
Contributor Author

joergdw commented Jul 14, 2023

We have failed in the intents to find a nice way to print out variables, theirs descriptions and assignments. Variables and descriptions could nicely be integrated with associative arrays, but we found no working version to pass them to shell-functions within a Makefile. Regarding assignments, we found no way to pass them via make as a string to a shell-function.

@joergdw joergdw closed this Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚧🛠️ WIP📝 Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant