-
Notifications
You must be signed in to change notification settings - Fork 89
fix: lint script to emit error #1665
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
Conversation
codebuild_specs/scripts/lint_pr.sh
Outdated
|
|
||
| # get PR file list, filter out removed files, filter only JS/TS files, then pass to the linter | ||
| curl -fsSL https://api.github.com/repos/$PROJECT_USERNAME/$REPO_NAME/pulls/$PR_NUM/files | jq -r '.[] | select(.status!="removed") | .filename' | grep -E '\.(js|jsx|ts|tsx)$' || true | xargs yarn eslint | ||
| curl -fsSL https://api.github.com/repos/$PROJECT_USERNAME/$REPO_NAME/pulls/$PR_NUM/files | jq -r '.[] | select(.status!="removed") | .filename' | (grep -E '\.(js|jsx|ts|tsx)$' || true) | xargs yarn eslint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The parenthesis is required here. Otherwise it won't emit the lint error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see the same bug in circle-ci lint script as well, but at this point I don't think we care much about fixing that.
|
I've tested this with a couple of open PRs.
|
Description of changes
Fix the issue of lint error not emitting
CDK / CloudFormation Parameters Changed
Issue #, if available
Description of how you validated changes
Checklist
yarn testpassesBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.