From 52baa359a4a33bcf4e8e9aa2d9fb90df31cb52c3 Mon Sep 17 00:00:00 2001 From: Opeyemi Date: Wed, 28 Feb 2024 22:33:05 +0100 Subject: [PATCH] [DEVOPS - 1823] - Edit run Step with Pipe (#255) * make run step only fail when it uses pipe --- lint-workflow/lint.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/lint-workflow/lint.py b/lint-workflow/lint.py index c4bd05fa..1f793b43 100644 --- a/lint-workflow/lint.py +++ b/lint-workflow/lint.py @@ -211,8 +211,6 @@ def lint(filename): supported_actions = {"act10ns/slack", "actions/cache", "actions/checkout", "actions/delete-package-versions", "actions/download-artifact", "actions/github-script", "actions/labeler", "actions/setup-dotnet", "actions/setup-java", "actions/setup-node", "actions/setup-python", "actions/stale", "actions/upload-artifact", "android-actions/setup-android", "Asana/create-app-attachment-github-action", "Azure/functions-action", "Azure/get-keyvault-secrets", "Azure/login", "azure/webapps-deploy", "bitwarden/sm-action", "checkmarx/ast-github-action", "chrnorm/deployment-action", "chrnorm/deployment-status", "chromaui/action", "cloudflare/pages-action", "convictional/trigger-workflow-and-wait", "crazy-max/ghaction-import-gpg", "crowdin/github-action", "dawidd6/action-download-artifact", "dawidd6/action-homebrew-bump-formula", "digitalocean/action-doctl", "docker/build-push-action", "docker/setup-buildx-action", "docker/setup-qemu-action", "dorny/test-reporter", "dtolnay/rust-toolchain", "futureware-tech/simulator-action", "hashicorp/setup-packer", "macauley/action-homebrew-bump-cask", "microsoft/setup-msbuild", "ncipollo/release-action", "peter-evans/close-issue", "ruby/setup-ruby", "samuelmeuli/action-snapcraft", "snapcore/action-build", "sonarsource/sonarcloud-github-action", "stackrox/kube-linter-action", "Swatinem/rust-cache", "SwiftDocOrg/github-wiki-publish-action", "SwiftDocOrg/swift-doc", "tj-actions/changed-files", "yogevbd/enforce-label-action"} - - findings = [] max_error_level = 0 @@ -378,16 +376,6 @@ def lint(filename): ) ) - # If the step has a 'run' key and only has one command, check if it's a single line. - if "run" in step: - if step["run"].count("\n") == 1: - findings.append( - LintFinding( - f"Run in step {str(i)} of job key '{job_key}' should be a single line.", - "warning", - ) - ) - if len(findings) > 0: print("#", filename) for finding in findings: