From ba47835ebf61789dde65737a6e6768305058f65f Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Thu, 6 Aug 2026 23:52:40 -0500 Subject: [PATCH] build: guard against binary download failures when creating EditorConfig lint issues --- type: pre_commit_static_analysis_report description: Results of running static analysis checks when committing changes. report: - task: lint_filenames status: passed - task: lint_editorconfig status: passed - task: lint_markdown_pkg_readmes status: na - task: lint_markdown_docs status: na - task: lint_markdown status: na - task: lint_package_json status: na - task: lint_repl_help status: na - task: lint_javascript_src status: na - task: lint_javascript_cli status: na - task: lint_javascript_examples status: na - task: lint_javascript_tests status: na - task: lint_javascript_benchmarks status: na - task: lint_python status: na - task: lint_r status: na - task: lint_c_src status: na - task: lint_c_examples status: na - task: lint_c_benchmarks status: na - task: lint_c_tests_fixtures status: na - task: lint_shell status: na - task: lint_typescript_declarations status: passed - task: lint_typescript_tests status: na - task: lint_license_headers status: passed --- --- .github/workflows/lint_random_files.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/lint_random_files.yml b/.github/workflows/lint_random_files.yml index abfb65287da3..9208b7dd95ad 100644 --- a/.github/workflows/lint_random_files.yml +++ b/.github/workflows/lint_random_files.yml @@ -206,6 +206,9 @@ jobs: id: lint-editorconfig env: FILES: ${{ steps.random-files.outputs.files }} + + # Provide a token so that the editorconfig-checker binary download is authenticated, thus avoiding rate limiting: + GITHUB_TOKEN: ${{ github.token }} run: | set -o pipefail files=$(echo "$FILES" | tr ',' ' ') @@ -217,6 +220,12 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.STDLIB_BOT_PAT_REPO_WRITE }} run: | + # Guard against creating spurious issues when the lint step failed due to an infrastructure error (e.g., failing to download the editorconfig-checker binary due to rate limiting) rather than actual lint errors: + if grep -q 'Failed to download binary' lint_editorconfig_errors.txt 2>/dev/null; then + echo 'EditorConfig lint step failed due to an infrastructure error (e.g., failed binary download). Skipping issue creation.' + exit 0 + fi + strip_ansi() { sed -r 's/\x1B\[[0-9;]*[mK]//g' }