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

🐛 [bug]: Can't pass -ignore flag #13

Closed
1 task done
joernott opened this issue Oct 19, 2023 · 2 comments · Fixed by #19
Closed
1 task done

🐛 [bug]: Can't pass -ignore flag #13

joernott opened this issue Oct 19, 2023 · 2 comments · Fixed by #19
Labels
bug Something isn't working

Comments

@joernott
Copy link

joernott commented Oct 19, 2023

🐛 What happened?

In one of my workflows, I am using an action with dynamic outputs. Actionlint reports those (as they are not explicitly declared) with the error message

property "deprecated_tests_failure_pattern" is not defined in object type {conclusion: string; outcome: string; outputs: {string => string}} [expression]

I would like to ignore them. Locally, I use

 actionlint -ignore 'property ".+" is not defined in object type'

to achieve this. I tried passing the string to the "flags" input of your action, using

      - name: Run actionlint
        id: actionlint
        uses: raven-actions/actionlint@v1
        with:
          flags: '-ignore "property \".+\" is not defined in object type"'

but I am getting an error "could not read "type"": open type": no such file or directory"

I am no javascript expert, but I assume this is due to https://github.com/raven-actions/actionlint/blob/main/action.yml#L355 splitting the "flags" at every space, completely ignoring the quotes.

🔬 How to reproduce?

Use an action with dynamic output (e.g. https://github.com/joernott/load_testplan/tree/main) and run actionlint on it

🏗️ Code Sample / Log

No response

🌌 Environment (actionlint action)

v1.0.2

🌌 Environment (actionlint)

1.6.26

🌌 Environment (GitHub Runner OS)

Linux

📷 Screenshots

No response

📈 Expected behavior

There should be a way to pass multiple ignore patterns to the action, e.g. with a dedicated "input" input.

📎 Additional context

No response

📜 Code of Conduct

  • I agree to follow this project's Code of Conduct.
@joernott joernott added the bug Something isn't working label Oct 19, 2023
@bhundven
Copy link
Contributor

You could use the configuration file (.github/actionlint.yaml) instead: https://github.com/rhysd/actionlint/blob/main/docs/config.md#configuration-file

DariuszPorowski added a commit that referenced this issue Nov 13, 2023
## 💌 Description

<!-- Add a more detailed description of the changes if needed. -->

## 🔗 Related issue

<!-- If your PR refers to a related issue, link it here. -->
Fixes: #13 

## 🏗️ Type of change

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [ ] 📚 Examples/docs/tutorials
- [x] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] 🥂 Improvement (non-breaking change which improves an existing
feature)
- [ ] 🚀 New feature (non-breaking change which adds functionality)
- [ ] 💥 Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] 🚨 Security fix
- [ ] ⬆️ Dependencies update

## ✅ Checklist

<!-- Mark with an `x` all the checkboxes that apply (like `[x]`) -->

- [x] I've read the [`Code of
Conduct`](https://github.com/raven-actions/actionlint/blob/main/.github/CODE_OF_CONDUCT.md)
document.
- [x] I've read the
[`Contributing`](https://github.com/raven-actions/actionlint/blob/main/.github/CONTRIBUTING.md)
guide.
@DariuszPorowski
Copy link
Collaborator

@joernott the new release 1.0.3 should handle it now :)
@bhundven good idea for the workaround :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants