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

Lintrule does not respect instructions to ignore certain things #19

Open
amccarthy1 opened this issue Jun 21, 2023 · 1 comment
Open

Comments

@amccarthy1
Copy link

I wanted to add linting to our github workflows, but lintrule is convinced that actions/checkout@v3 does not exist (this makes sense, it wouldn't have a database of package versions). I get warnings like this:

   x FAIL  .rules/github.md => .github/workflows/lintRule.yml (6863ms)

The 'uses' field of the 'actions/checkout' step should have a valid version, such as 'v2' instead of 'v3'.

However, more concerning is that I tried quite a few ways to tell lintrule to ignore this class of errors:

Do not validate the uses field of any workflow step. Allow any package versions, even if they are not the latest or do not exist.

here's my full config:

---
include: [".github/**/*"]
---

YML files related to github workflows should be correct, clear, and secure.
Do not validate the `uses` field of any workflow step. Allow any package versions, even if they are not the latest or do not exist.

1. Disallow typos and copy-paste errors.
2. Disallow configuration errors or bugs.
3. Names for each step should be accurate descriptions of the step

Any guidance on how to tell lintrule to ignore something like this? I would imagine this specific issue (package versions) to affect a lot of folks, as many configuration files end up including dependency versions, which lintrule likely would not have a complete database for.

@Flaque
Copy link
Collaborator

Flaque commented Jun 21, 2023

Ah, Lintrule won't know about things before 2021 unless you tell it.

In this case, you can just tell it: "We're using actions/checkout@v3"

---
include: [".github/**/*"]
---

YML files related to github workflows should be correct, clear, and secure.
Do not validate the `uses` field of any workflow step. Allow any package versions, even if they are not the latest or do not exist. We use the new `actions/checkout@v3`. 

1. Disallow typos and copy-paste errors.
2. Disallow configuration errors or bugs.
3. Names for each step should be accurate descriptions of the step

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants