-
Notifications
You must be signed in to change notification settings - Fork 57
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
improve lint workflow to avoid fast fail #1378
Conversation
Signed-off-by: Joshua Li <joshuali925@gmail.com>
jq -r '.[]' ${HOME}/files_modified.json ${HOME}/files_added.json | sort | uniq > /tmp/changed_files.txt | ||
CHANGED_FILES=$(cat /tmp/changed_files.txt) | ||
echo "These are the changed files: $CHANGED_FILES" | ||
CHANGED_FILES=($(jq -r '.[]' ${HOME}/files_modified.json ${HOME}/files_added.json | grep '.\+.\(js\|ts\|tsx\)$' | sort -u)) |
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 remember one of the issues we were trying to tackle was when a file is renamed, both 'modified' and 'added' shas will show the same renamed file which lead to later lint that file more than once, is it? @RyanL1997 , is this considered in the new change as I saw uniq was removed?
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.
prefer sort -u
over sort | uniq
. they have the same output
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.
@mengweieric Yes, that shouldn't be a problem. Since the above step Check Changes of Files
has filtered the output
Signed-off-by: Joshua Li <joshuali925@gmail.com> (cherry picked from commit e3116ca) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
(cherry picked from commit e3116ca) Signed-off-by: Joshua Li <joshuali925@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Joshua Li <joshuali925@gmail.com>
…pensearch-project#1384) (cherry picked from commit e3116ca) Signed-off-by: Joshua Li <joshuali925@gmail.com> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> (cherry picked from commit 305e037)
Description
make it fail after linting all files
Issues Resolved
#1369 (comment)
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.