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

Add shell linter github action #274

Closed
wants to merge 3 commits into from

Conversation

kauana
Copy link
Member

@kauana kauana commented Feb 16, 2023

Changes

  • Add shellcheck linter as a github action (uses knative's reusable style action)
  • See this PR for an example of how the action works when someone attempts to add bad shell code

/kind enhancement

Fixes #269

@knative-prow knative-prow bot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Feb 16, 2023
Copy link
Contributor

@cardil cardil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR! 😍

Please take a look at my comment, about the scope of the linter.

Adding a hold until we are sure it's safe to adopt it

/hold

.github/workflows/linter.yaml Outdated Show resolved Hide resolved
@knative-prow knative-prow bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 16, 2023
Update Linter so it works with the current opened PR

Co-authored-by: Chris Suszynski <krzysztof.suszynski@gmail.com>
@knative-prow
Copy link

knative-prow bot commented Feb 16, 2023

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: kauana
Once this PR has been reviewed and has the lgtm label, please ask for approval from cardil. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Feb 16, 2023
@krsna-m
Copy link
Contributor

krsna-m commented Apr 10, 2023

Hey there, sorry for this hanging here for so long. I think the correct solution is to add hack repo to knobots to use the style directive. That way the workflow is managed by the automation system. There is examples of the style reusable action in serving, eventing, etc. that uses this system.

@kauana
Copy link
Member Author

kauana commented May 12, 2023

Hey @kvmware, sorry for the wait as well! I believe knative/hack is already added to knobots, but the github actions are currently excluded for this repo.

If that's ok with you, I'm happy to update that so knative/hack can take advance of the style action. Thanks

@krsna-m
Copy link
Contributor

krsna-m commented May 15, 2023

That should work thanks

kauana pushed a commit to kauana/knobots that referenced this pull request May 15, 2023
knative-prow bot pushed a commit to knative-extensions/knobots that referenced this pull request May 16, 2023
* Include knative/hack repo for GH actions

- See `knative/hack` [PR](knative/hack#274 (comment))

* Only add style action to knative/hack

* Update README to reflect workflow-template changes
@kauana kauana closed this May 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. kind/enhancement size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add shellcheck linter
3 participants