[
https://issues.apache.org/jira/browse/BEAM-9274?focusedWorklogId=384689&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-384689
]
ASF GitHub Bot logged work on BEAM-9274:
----------------------------------------
Author: ASF GitHub Bot
Created on: 10/Feb/20 19:53
Start Date: 10/Feb/20 19:53
Worklog Time Spent: 10m
Work Description: chadrik commented on issue #10810: [BEAM-9274] Support
running yapf in a git pre-commit hook
URL: https://github.com/apache/beam/pull/10810#issuecomment-584319725
> What happens when I do a git commit and yapf makes changes to my staged
files? Does git abort the commit?
yes.
> Do the yapf changes appear as unstaged?
yes.
Also note that `pre-commit` only runs on staged changes: it stashes
unstaged changes to ensure that it's running against the code *as it will be
committed*. So after the yapf changes are applied you must stage them and
re-run `git commit`, then the tests will re-run.
You can prevent hooks from running by passing `-n`. I find it's common to
use `git commit -nam "blarg"` when I'm iterating quickly and don't want to run
the hooks yet.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 384689)
Time Spent: 40m (was: 0.5h)
> Support running yapf in a git pre-commit hook
> ---------------------------------------------
>
> Key: BEAM-9274
> URL: https://issues.apache.org/jira/browse/BEAM-9274
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Reporter: Chad Dombrova
> Assignee: Chad Dombrova
> Priority: Major
> Time Spent: 40m
> Remaining Estimate: 0h
>
> As a developer I want to be able to automatically run yapf before I make a
> commit so that I don't waste time with failures on jenkins.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)