mandatory code formatting complicates code reviews #200
Labels
No labels
area: devops
area: discovery
area: docs
area: livestream
area: proposal
consider soon
Epic
good first issue
hacktoberfest
hard fork
help wanted
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
on hold
priority: blocker
priority: high
priority: low
priority: medium
resilience
soft fork
Tom's Wishlist
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
work in progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbrycrd#200
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The code formatting script makes the author's exact changes ambiguous, leading to more complicated code reviews. Reviews would be easier if PRs came in without additional formatting changes.
Options:
We don't currently run code formatting tools on Windows. In addition, the code formatting tools on OSX have proven to have some compatibility differences. Testing and developing on OSX can also be problematic if no one on the team is actively using that OS.
In this model, It's up to the PR author to run formatting to ensure it passes the diff check before issuing it. Maybe that isn't the right answer, but that's what the current checking is trying to enforce.
If we're not going to use this model, I'd like to see (after the upstream merge) some kind of automated formatter that just runs clang-format nightly across the entire code base and commits changes if any.
The advantage to how it is now is that it guarantees reviewers don't have to page through useless style changes (made manually or automatically by some editors). I suspect removing this will further complicate the review process.
It looks good to me.
This is exactly how it should be, about me. I mean these is no guaranteed, just ask author to remove them in RR.
I think this is fine. Because as we've discussed , many areas of the code do not conform to standard formatting and it creates very inconsistent looking code if the PR is a small change. So maybe it is best to ignore formatting issues returned by the clang auto format tool in some cases. And yes its also annoying to have to review formatting changes together with the actual change.
But I still think we should run it anyways individually, and have it show up on travis so that we have some way of enforcing formatting where we need to. Just that we can choose to ignore it in certain situations.
I think this could be fine, or there could be seperate PR's just to correct the formatting. Or maybe it can be something automated? If its automated, I think it should not run on the entire code base, maybe just for the claimtrie code or just for any new commits.
It's no longer part of the build.