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

ci: lint all modules even if one module fails #15819

Merged
merged 4 commits into from
Apr 12, 2023

Conversation

mark-rushakoff
Copy link
Member

@mark-rushakoff mark-rushakoff commented Apr 12, 2023

Description

The previous implementation stopped linting when it encountered its first module that failed the linter.

Now, use a more idiomatic find|xargs pattern, which will run every module and exit non-zero if any module fails to lint. This will speed up the feedback cycle on CI in the event that multiple modules fail linting.

Also change the script extension to .bash to make it clear to consumers that this script requires bash, not sh; and make the script executable so that CI can execute it directly instead of calling sh $script.


Author Checklist

All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.

I have...

  • included the correct type prefix in the PR title
  • targeted the correct branch (see PR Targeting)
  • provided a link to the relevant issue or specification
  • reviewed "Files changed" and left comments if necessary
  • confirmed all CI checks have passed

Reviewers Checklist

All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.

I have...

  • confirmed the correct type prefix in the PR title
  • confirmed all author checklist items have been addressed
  • confirmed that this PR does not change production code

@mark-rushakoff mark-rushakoff requested a review from a team as a code owner April 12, 2023 14:22
@github-prbot github-prbot requested review from a team, JeancarloBarrios and likhita-809 and removed request for a team April 12, 2023 14:23
@mark-rushakoff
Copy link
Member Author

Moving to draft temporarily while I fix issues I didn't reproduce on my workstation.

@mark-rushakoff mark-rushakoff marked this pull request as draft April 12, 2023 14:30
The previous implementation stopped linting when it encountered its
first module that failed the linter.

Now, use a more idiomatic find|xargs pattern, which will run every
module and exit non-zero if any module fails to lint. This will speed up
the feedback cycle on CI in the event that multiple modules fail
linting.

Also change the script extension to .bash to make it clear to consumers
that this script requires bash, not sh; and make the script executable
so that CI can execute it directly instead of calling sh $script.
@mark-rushakoff mark-rushakoff force-pushed the mr/ci-lint-script-all-modules branch from 20e836b to 7f87a7a Compare April 12, 2023 14:45
@mark-rushakoff mark-rushakoff marked this pull request as ready for review April 12, 2023 15:06
@github-prbot github-prbot requested a review from a team April 12, 2023 15:06
Copy link
Member

@julienrbrt julienrbrt left a comment

Choose a reason for hiding this comment

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

tACK!

@mark-rushakoff mark-rushakoff enabled auto-merge (squash) April 12, 2023 15:21
This makes it simpler to tell, at a glance, how long each package takes
to lint.
@mark-rushakoff mark-rushakoff merged commit 3cef1a8 into main Apr 12, 2023
@mark-rushakoff mark-rushakoff deleted the mr/ci-lint-script-all-modules branch April 12, 2023 18:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants