Skip to content
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

Unable to ignore errors #481

Open
pociej opened this issue Nov 20, 2024 · 4 comments
Open

Unable to ignore errors #481

pociej opened this issue Nov 20, 2024 · 4 comments
Labels
not-reproducible Issues which cannot be reproduced by maintainer

Comments

@pociej
Copy link

pociej commented Nov 20, 2024

Hi I observed strange experience Im unable to understand.

here is me config

self-hosted-runner:
  labels:
    - aws-linux-small
    - aws-linux-medium
paths:
  .github/workflows/**/*.yaml:
    ignore:
      - 'shellcheck reported issue in this script: SC2086:.+'
      - 'shellcheck reported issue in this script: SC2046:.+'
      - 'shellcheck reported issue in this script: SC2155:.+'
      - 'shellcheck reported issue in this script: SC2044:.+'

It was working for me perfectly fine and stopped because of reasons i dont understand.
Im now hited by errors listed on ignore list

like that

.github/workflows/release.yaml:429:7: shellcheck reported issue in this script: SC2086:info:2:29: Double quote to prevent globbing and word splitting [shellcheck]
    |
429 |       run: |
    |       ^~~~
.github/workflows/test_e2e_devnet.yaml:57:9: shellcheck reported issue in this script: SC2044:warning:1:17: For loops over find output are fragile. Use find -exec or a while read loop [shellcheck]
   |
[57](https://github.com/vlayer-xyz/vlayer/actions/runs/11928877667/job/33246589658#step:4:58) |         run: |
   |         ^~~~

Im sure the config file is properly loaded as self-hosted-runners are there.
Im running actionlint as documented :

jobs:
  actionlint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Download actionlint
        id: get_actionlint
        run: bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash) 
        shell: bash
      - name: Check workflow files
        run: ${{ steps.get_actionlint.outputs.executable }}
        shell: bash

any idea of what could be the reason? Thx in advance.

@rhysd
Copy link
Owner

rhysd commented Nov 21, 2024

Can you provide your workflow input (smaller is better) which can reproduce this issue?

@ahmedelgabri
Copy link

@pociej make sure you are targeting the correct files, I had a problem yesterday with this too, then I realized I had to change the glob to *.{yaml,yml}

@rhysd
Copy link
Owner

rhysd commented Nov 21, 2024

I tried to reproduce it but I could not.

.github/actionlint.yaml:

paths:
  .github/workflows/**/*.yaml:
    ignore:
      - 'shellcheck reported issue in this script: SC2086:.+'

.github/workflows/test.yaml:

on: push

jobs:
  tests:
    runs-on: ubuntu-latest
    steps:
      # This causes SC2086
      - run: echo $FOO

And I ran:

actionlint

The command did not report any error. When I removed actionlint.yaml, it reported an error. So the command seems to work as intended.

Can you check actionlint command is the latest by actionlint -version?

@rhysd rhysd added the not-reproducible Issues which cannot be reproduced by maintainer label Nov 22, 2024
@chrisponton
Copy link

chrisponton commented Nov 22, 2024

This is happening to me too.

.github/actionlint.yml:

paths:
  .github/workflows/**/*.yml:
    ignore:
      - 'the runner of ".+" action is too old to run on GitHub Actions'

.github/workflows/simple.yml:

on:
  pull_request:
jobs:
  checkout:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3

Run:

actionlint

Output:

simple.yml:7:15: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue [action]
   |
7 |       - uses: actions/checkout@v3
   |               ^~~~~~~~~~~~~~~~~~~

Version:

actionlint -version
1.7.4
installed by building from source
built with go1.23.2 compiler for darwin/arm64

Note: If I run actionlint -ignore 'the runner of ".+" action is too old to run on GitHub Actions.' it is ignored.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-reproducible Issues which cannot be reproduced by maintainer
Projects
None yet
Development

No branches or pull requests

4 participants