From 9d5a5b114235d118c0070b24de0a2bd0f0f2d304 Mon Sep 17 00:00:00 2001 From: Karl Cardenas Date: Tue, 25 Jun 2024 15:18:57 -0700 Subject: [PATCH] test: added new tests --- .../tests/longform/.vale.ini | 4 +++ .../tests/longform/fail.md | 15 ++++++++ .../tests/longform/pass.md | 15 ++++++++ .../styles/spectrocloud/longform.yml | 36 +++++++++---------- .../spectrocloud/tests/longform/.vale.ini | 4 +++ packages/spectrocloud/tests/longform/fail.md | 15 ++++++++ packages/spectrocloud/tests/longform/pass.md | 15 ++++++++ 7 files changed, 85 insertions(+), 19 deletions(-) create mode 100644 packages/spectrocloud-docs-internal/tests/longform/.vale.ini create mode 100644 packages/spectrocloud-docs-internal/tests/longform/fail.md create mode 100644 packages/spectrocloud-docs-internal/tests/longform/pass.md create mode 100644 packages/spectrocloud/tests/longform/.vale.ini create mode 100644 packages/spectrocloud/tests/longform/fail.md create mode 100644 packages/spectrocloud/tests/longform/pass.md diff --git a/packages/spectrocloud-docs-internal/tests/longform/.vale.ini b/packages/spectrocloud-docs-internal/tests/longform/.vale.ini new file mode 100644 index 0000000..1f638ff --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/longform/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud-docs-internal.Longform = YES \ No newline at end of file diff --git a/packages/spectrocloud-docs-internal/tests/longform/fail.md b/packages/spectrocloud-docs-internal/tests/longform/fail.md new file mode 100644 index 0000000..bfb57b5 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/longform/fail.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + + ```shell + palette -h work -n + ``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name -n + ``` diff --git a/packages/spectrocloud-docs-internal/tests/longform/pass.md b/packages/spectrocloud-docs-internal/tests/longform/pass.md new file mode 100644 index 0000000..37e19d7 --- /dev/null +++ b/packages/spectrocloud-docs-internal/tests/longform/pass.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + +```shell +kubectl logs pod-name --namespace namespace +``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name --namespace + ``` diff --git a/packages/spectrocloud/styles/spectrocloud/longform.yml b/packages/spectrocloud/styles/spectrocloud/longform.yml index 3476ca7..f2d9ff0 100644 --- a/packages/spectrocloud/styles/spectrocloud/longform.yml +++ b/packages/spectrocloud/styles/spectrocloud/longform.yml @@ -1,7 +1,5 @@ # Copyright (c) Spectro Cloud # SPDX-License-Identifier: Apache-2.0 - ---- extends: existence message: "Avoid using the short form of commands. Replace the short form flag in '%s' with the corresponding long form flag." link: https://spectrocloud.atlassian.net/wiki/spaces/DE/pages/1765933057/Spectro+Cloud+Internal+Style+Guide#Commands-%26-Parameters @@ -9,21 +7,21 @@ level: error ignorecase: false scope: raw tokens: -# Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h. - - (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+ + # Match a word followed by one or more spaces, followed by the short form of a flag (one to three letters). The short flag can appear one or more times consecutively. For example: palette -h. + - (\b([\w]+))([\s ]{1,}[-][a-zA-Z]{1,3})+ exceptions: - - ls([\s ]{1,}[-][a-zA-Z]{1,3})+ - - cd([\s ]{1,}[-][a-zA-Z]{1,3})+ - - cp([\s ]{1,}[-][a-zA-Z]{1,3})+ - - mv([\s ]{1,}[-][a-zA-Z]{1,3})+ - - rm([\s ]{1,}[-][a-zA-Z]{1,3})+ - - mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+ - - rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+ - - cat([\s ]{1,}[-][a-zA-Z]{1,3})+ - - pwd([\s ]{1,}[-][a-zA-Z]{1,3})+ - - echo([\s ]{1,}[-][a-zA-Z]{1,3})+ - - chmod([\s ]{1,}[-][a-zA-Z]{1,3})+ - - chown([\s ]{1,}[-][a-zA-Z]{1,3})+ - - sed([\s ]{1,}[-][a-zA-Z]{1,3})+ - - wc([\s ]{1,}[-][a-zA-Z]{1,3})+ - - tar([\s ]{1,}[-][a-zA-Z]{1,3})+ \ No newline at end of file + - ls([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cd([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cp([\s ]{1,}[-][a-zA-Z]{1,3})+ + - mv([\s ]{1,}[-][a-zA-Z]{1,3})+ + - rm([\s ]{1,}[-][a-zA-Z]{1,3})+ + - mkdir([\s ]{1,}[-][a-zA-Z]{1,3})+ + - rmdir([\s ]{1,}[-][a-zA-Z]{1,3})+ + - cat([\s ]{1,}[-][a-zA-Z]{1,3})+ + - pwd([\s ]{1,}[-][a-zA-Z]{1,3})+ + - echo([\s ]{1,}[-][a-zA-Z]{1,3})+ + - chmod([\s ]{1,}[-][a-zA-Z]{1,3})+ + - chown([\s ]{1,}[-][a-zA-Z]{1,3})+ + - sed([\s ]{1,}[-][a-zA-Z]{1,3})+ + - wc([\s ]{1,}[-][a-zA-Z]{1,3})+ + - tar([\s ]{1,}[-][a-zA-Z]{1,3})+ diff --git a/packages/spectrocloud/tests/longform/.vale.ini b/packages/spectrocloud/tests/longform/.vale.ini new file mode 100644 index 0000000..381c9c0 --- /dev/null +++ b/packages/spectrocloud/tests/longform/.vale.ini @@ -0,0 +1,4 @@ +StylesPath = ../../styles/ +MinAlertLevel = suggestion +[*.md] +spectrocloud.Longform = YES \ No newline at end of file diff --git a/packages/spectrocloud/tests/longform/fail.md b/packages/spectrocloud/tests/longform/fail.md new file mode 100644 index 0000000..bfb57b5 --- /dev/null +++ b/packages/spectrocloud/tests/longform/fail.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + + ```shell + palette -h work -n + ``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name -n + ``` diff --git a/packages/spectrocloud/tests/longform/pass.md b/packages/spectrocloud/tests/longform/pass.md new file mode 100644 index 0000000..37e19d7 --- /dev/null +++ b/packages/spectrocloud/tests/longform/pass.md @@ -0,0 +1,15 @@ +## Debug Steps + +Use the following steps to debug the issue. + +1. Check the logs for any errors. + +```shell +kubectl logs pod-name --namespace namespace +``` + +2. Check the status of the pods. + + ```shell + kubeclt logs pod-name --namespace + ```