Thanks to visit codestin.com
Credit goes to github.com

Skip to content

JSCPD Doesn't Run Unless TEST_CASE_RUN is set #5483

@ccolella-mdc

Description

@ccolella-mdc

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

JSCPD only runs if you specify TEST_CASE_RUN as true or false

Expected Behavior

JSCPD should still run even if you don't specify a value for TEST_CASE_RUN

Super-Linter version

v6.3.1

Relevant log output

  2024-04-05 01:20:31 [DEBUG]   Categorizing the following files: /github/workspace/.github/workflows/linting.yml /github/workspace
  2024-04-05 01:20:31 [DEBUG]   FILTER_REGEX_INCLUDE: , FILTER_REGEX_EXCLUDE: 
  2024-04-05 01:20:31 [DEBUG]   IGNORE_GENERATED_FILES has a valid boolean string value: false
  2024-04-05 01:20:31 [DEBUG]   IGNORE_GITIGNORED_FILES has a valid boolean string value: false
  2024-04-05 01:20:31 [DEBUG]   FILE: /github/workspace/.github/workflows/linting.yml, FILE_TYPE: yml, BASE_FILE: linting.yml, FILE_DIR_NAME: /github/workspace/.github/workflows
  2024-04-05 01:20:31 [DEBUG]   File:[/github/workspace/.github/workflows/linting.yml], File extension:[yml], File type: [/github/workspace/.github/workflows/linting.yml: ASCII text]
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is NOT a supported shell script. Skipping
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a GitHub Actions file...
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is GitHub Actions file.
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a Cloud Formation file...
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is an OpenAPI file...
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is NOT an OpenAPI descriptor
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a Tekton file...
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a Kubernetes descriptor...
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is NOT a Kubernetes descriptor
  2024-04-05 01:20:31 [DEBUG]   FILE: /github/workspace, FILE_TYPE: /github/workspace, BASE_FILE: workspace, FILE_DIR_NAME: /github
  2024-04-05 01:20:31 [DEBUG]   /github/workspace matches with /github/workspace. Adding it to the list of directories to lint for linters that are expected to lint the whole codebase
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/linters/.checkov.yml contains a 'directory:' configuration option
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/linters/.checkov.yml doesn't contain a 'directory:' statement
  2024-04-05 01:20:31 [DEBUG]   Adding /github/workspace to the list of directories to analyze with Checkov.
  ",
      "Stderr": ""
    }
  ]
  2024-04-05 01:20:31 [INFO]   Command output when building the file list:
  ------
  2024-04-05 01:20:31 [DEBUG]   Categorizing the following files: /github/workspace/.github/workflows/linting.yml /github/workspace
  2024-04-05 01:20:31 [DEBUG]   FILTER_REGEX_INCLUDE: , FILTER_REGEX_EXCLUDE: .*\.dll|MDClarityWeb\/.*\.min\.(js|css)|MDClarityWeb\/(js|css)\/modules\/.*
  2024-04-05 01:20:31 [DEBUG]   IGNORE_GENERATED_FILES has a valid boolean string value: false
  2024-04-05 01:20:31 [DEBUG]   IGNORE_GITIGNORED_FILES has a valid boolean string value: false
  2024-04-05 01:20:31 [DEBUG]   FILE: /github/workspace/.github/workflows/linting.yml, FILE_TYPE: yml, BASE_FILE: linting.yml, FILE_DIR_NAME: /github/workspace/.github/workflows
  2024-04-05 01:20:31 [DEBUG]   File:[/github/workspace/.github/workflows/linting.yml], File extension:[yml], File type: [/github/workspace/.github/workflows/linting.yml: ASCII text]
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is NOT a supported shell script. Skipping
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a GitHub Actions file...
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is GitHub Actions file.
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a Cloud Formation file...
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is an OpenAPI file...
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is NOT an OpenAPI descriptor
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a Tekton file...
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/workflows/linting.yml is a Kubernetes descriptor...
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/workflows/linting.yml is NOT a Kubernetes descriptor
  2024-04-05 01:20:31 [DEBUG]   FILE: /github/workspace, FILE_TYPE: /github/workspace, BASE_FILE: workspace, FILE_DIR_NAME: /github
  2024-04-05 01:20:31 [DEBUG]   /github/workspace matches with /github/workspace. Adding it to the list of directories to lint for linters that are expected to lint the whole codebase
  2024-04-05 01:20:31 [DEBUG]   Checking if /github/workspace/.github/linters/.checkov.yml contains a 'directory:' configuration option
  2024-04-05 01:20:31 [DEBUG]   /github/workspace/.github/linters/.checkov.yml doesn't contain a 'directory:' statement
  2024-04-05 01:20:31 [DEBUG]   Adding /github/workspace to the list of directories to analyze with Checkov.
  ------
  2024-04-05 01:20:31 [DEBUG]   Stderr when building the file list is empty
  2024-04-05 01:20:31 [INFO]   Successfully gathered list of files...
  2024-04-05 01:20:31 [DEBUG]   Ending GitHub Actions log group: Super-Linter initialization

Steps To Reproduce

  1. Run super-linter in github-actions with no value set for TEST_CASE_RUN

ex:

      - name: Run Super Linter
        uses: super-linter/super-linter@v6
        env:
          VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' }}
          DEFAULT_BRANCH: master
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CREATE_LOG_FILE: true
          LOG_LEVEL: 'DEBUG'

Anything else?

Relevant piece of code causing the issue:

# JSCPD test cases are handled below because we first need to exclude non-relevant test cases
if [[ "${TEST_CASE_RUN}" == "false" ]]; then
debug "Add ${FILE} to the list of items to lint with JSCPD"
echo "${FILE}" >>"${FILE_ARRAYS_DIRECTORY_PATH}/file-array-JSCPD"
fi

It should either default to false somewhere or this check should be changed to [[ "${TEST_CASE_RUN}" != "true" ]]"

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions