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

Filter out deleted paths from files_to_lint in the pre-push hook #38

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

jaredly
Copy link
Contributor

@jaredly jaredly commented Aug 3, 2021

Summary:

I'm a little wary about changing this as I have never personally used it (I deleted all git hooks shortly after cloning webapp the first time),
but this feels like a minimally invasive change.

Issue: https://khanacademy.atlassian.net/browse/FEI-3574

Test plan:

🤞

I'm a little wary about changing this as I have never personally used it (I deleted all git hooks shortly after cloning webapp the first time),
but this feels like a minimally invasive change.

Issue: https://khanacademy.atlassian.net/browse/FEI-3574

Test plan:
🤞
@jaredly jaredly self-assigned this Aug 3, 2021
@jaredly jaredly requested a review from kevinbarabash August 3, 2021 18:36
Copy link
Contributor

@kevinbarabash kevinbarabash left a comment

Choose a reason for hiding this comment

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

Seems reasonable to me and easy to understand. :shipit:

Copy link
Member

@somewhatabstract somewhatabstract left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you for tackling this. I love the simple fix here.

Comment on lines +178 to +179
files_to_lint = list({f for f in files_to_lint.split('\0')
if f and os.path.exists(f)})
Copy link
Member

Choose a reason for hiding this comment

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

Oh, that's a neat way of handling it. Nice. I was envisioning needing to change the command that gets the list of files in the first place. Nice. 🎉

@jaredly jaredly merged commit ea7872b into master Aug 5, 2021
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

Successfully merging this pull request may close these issues.

3 participants