Office LifeJan 9, 2019
NewDongZilla

Your teammate approves bad code and it gets merged. What do you do?

Teammate merged some bad code yesterday. I just read the PR and it’s pretty bad. Basically repeated the same code for each model type on each view. God damn. These rubberstamp ✔️🤦‍♂️

Add a comment
Snowflake Computing Bullshitty Jan 9, 2019

As long as the test suite runs fine, no need to worry. Just give an honest and light suggestion to the person for next time.

New
DongZilla OP Jan 9, 2019

We have no tests for this code.

New
DongZilla OP Jan 9, 2019

I felt so dirty saying that.

Amazon :! Jan 9, 2019

Do the needful and revert back

Amazon :! Jan 9, 2019

Sorry for not being kindly

Snowflake Computing Bullshitty Jan 9, 2019

No problem. You did the needful.

Tableau Zero Cool Jan 9, 2019

Open an issue and add branch policies to be set as a required reviewer the next time

Hubspot bloyg Jan 9, 2019

There are code inspection tools that will detect duplicated code and classify them as tech debt. The tech debt stats would allow you to justify complaining about the code.

Tableau Zero Cool Jan 9, 2019

Actually, you should have this static code analysis as a pre-checkin rule.

Northrop Grumman frontbutt Jan 9, 2019

Most source control tools like github and fecru can have the default changed from 1 sign off to multiple. Also, it may be worth it to enforce a time limit like 5 days or more to give people ample time to review it. You should definitely have a team discussion about this so you don't have a new employee approving a pr they don't understand, and the requester merging bad code because "it was approved". And uh, if there's no tests for the code, it sounds like you may have more on your plate in the future. (require code changes to be covered, part of the definition of "done", etc... ) Good luck op