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

Proposal: adoption of checkton (runs ShellCheck on Tekton YAML files) #1156

Open
chmeliik opened this issue Jul 9, 2024 · 4 comments
Open

Comments

@chmeliik
Copy link

chmeliik commented Jul 9, 2024

Hi 👋

I made https://github.com/chmeliik/checkton, a GitHub action that runs ShellCheck on scripts embedded in YAML files.

The main motivation was to use it on https://github.com/konflux-ci/build-definitions, a decently sized collection of Tasks, Pipelines and StepActions that could greatly benefit having its shell scripts linted. The PoC pull request introducing the linter is konflux-ci/build-definitions#1085. It may be interesting to note that the default mode of operation is "differential" - don't report existing issues, report only those introduced in a pull request.

Would you be interested in having this project be part of the tektoncd community?

Who will own it

@vdemeester
Copy link
Member

cc @tektoncd/governing-board

@vdemeester
Copy link
Member

@chmeliik one question, it could be used standalone as well, am I right ? The reason I ask this is, we could also have a Task that does this somehow.

Another topic I want to bring in the discussion here, is tektoncd/catlin. This sounds like something that could be handled by catlin, maybe ? That said, tektoncd/catlin needs some refining, and it might benefit from migrating to a python based project to be more dynamic.

@chmeliik
Copy link
Author

one question, it could be used standalone as well, am I right ? The reason I ask this is, we could also have a Task that does this somehow.

It could be, yeah. Apart from some bits in https://github.com/chmeliik/checkton/blob/main/src/action.sh, none of it is GH-actions specific.

This sounds like something that could be handled by catlin, maybe?

At first glance, I would say the goals are different. Catlin seems to be about linting Tekton-catalog specific concerns (?) while Checkton just runs ShellCheck on embedded scripts. One nice - if somewhat coincidental - feature of Checkton is that it technically works with any YAML, not just Tekton, as long as your embedded scripts start with #!shebangs. The Tekton-specific feature is just detection of script: attributes so that it catches scripts that don't start with shebangs as well. That would probably be lost by integrating into Catlin

@chmeliik
Copy link
Author

we could also have a Task that does this somehow.

Would having a Tekton task increase the likelihood of adoption into the tektoncd org? Do you see it as a prerequisite?

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