-
Notifications
You must be signed in to change notification settings - Fork 164
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
Generate checluster references tables #1803
Conversation
LGTM. We are waiting for @l0rd approval now. |
gen script requires |
We can add: .Prerequisites
|
The che-docs container has |
Can you confirm it runs on che.openshift.io? |
I've just checked:
[1] https://raw.githubusercontent.com/eclipse/che-docs/master/devfile.yaml |
@MichalMaler the requirement is to build the docs, not to the user-facing docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the shellcheck errors:
shellcheck tools/checluster_docs_gen.sh
In tools/checluster_docs_gen.sh line 17:
TABLE_HEADER="$NEWLINE[cols="2,5", options="header"]$NEWLINE:=== $NEWLINE Property: Description $NEWLINE"
^-- SC1087: Use braces when expanding arrays, e.g. ${array[idx]} (or ${var}[.. to quiet).
^----^ SC2140: Word is of the form "A"B"C" (B indicated). Did you mean "ABC" or "A"B"C"?
In tools/checluster_docs_gen.sh line 19:
PARENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")/.." ; pwd -P )
^-- SC2164: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
Did you mean:
PARENT_PATH=$( cd "$(dirname "${BASH_SOURCE[0]}")/.." || exit ; pwd -P )
In tools/checluster_docs_gen.sh line 27:
if [ $? -ne 0 ]; then
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In tools/checluster_docs_gen.sh line 41:
if [ $? -ne 0 ]; then
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In tools/checluster_docs_gen.sh line 59:
if [ $? -ne 0 ]; then
^-- SC2181: Check exit code directly with e.g. 'if mycmd;', not indirectly with $?.
In tools/checluster_docs_gen.sh line 88:
local section=$(echo "$RAW_CONTENT" | yq -M '.spec.validation.openAPIV3Schema.properties.status')
^-----^ SC2155: Declare and assign separately to avoid masking return values.
In tools/checluster_docs_gen.sh line 90:
local section=$(echo "$RAW_CONTENT" | yq -M '.spec.validation.openAPIV3Schema.properties.spec.properties.'$sectionName)
^-----^ SC2155: Declare and assign separately to avoid masking return values.
^----------^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
local section=$(echo "$RAW_CONTENT" | yq -M '.spec.validation.openAPIV3Schema.properties.spec.properties.'"$sectionName")
In tools/checluster_docs_gen.sh line 94:
$(echo "$section" | yq -M '.properties | keys[]' )
^-- SC2207: Prefer mapfile or read -a to split command output (or quote to avoid splitting).
In tools/checluster_docs_gen.sh line 103:
description=$(echo "$section" | yq -M '.properties.'$prop'.description')
^---^ SC2086: Double quote to prevent globbing and word splitting.
Did you mean:
description=$(echo "$section" | yq -M '.properties.'"$prop"'.description')
For more information:
https://www.shellcheck.net/wiki/SC1087 -- Use braces when expanding arrays,...
https://www.shellcheck.net/wiki/SC2140 -- Word is of the form "A"B"C" (B in...
https://www.shellcheck.net/wiki/SC2155 -- Declare and assign separately to ...
@themr0c |
@tolusha shellcheck is the most widespread linter for bash scripts (22K stars) and it's common to run our scripts against it. |
@themr0c |
$ shellcheck checluster_docs_gen.sh
$ no issues with spellchecker anymore ... |
So now, what can we do for the vale errors? |
let me take a look |
To fix vale errors: For the static file, For the generated file:
|
Too much of vale errors, that's not possible to fix at script using substitution.
|
I've just updated PR based on the latest changes from master branch of che-operator to see if we have any vale errors. |
I've update checluster doc based on master che-operator branch. So, we don't have value errors anymore. |
NB: If PR is merged then checluster references tables will be regenerated based on 7.25 version of che-operator (from antora-playbook.yaml) which doesn't contain all vale fixes. |
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
Signed-off-by: Anatolii Bazko <abazko@redhat.com>
* Generate checluster references tables Signed-off-by: Anatolii Bazko <abazko@redhat.com> Co-authored-by: Michal Maléř <48474054+MichalMaler@users.noreply.github.com>
Signed-off-by: Anatolii Bazko abazko@redhat.com
What does this PR do?
Add scripts to sync doc and checluster crd
What issues does this PR fix or reference?
https://issues.redhat.com/browse/RHDEVDOCS-2216
PR Checklist
As the author of this Pull Request I made sure that:
vale
has been run successfully against the PR branch