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

Java CLI to format parts of files based on git diff #39

Merged
merged 4 commits into from
Oct 21, 2019

Conversation

iamdanfox
Copy link
Contributor

@iamdanfox iamdanfox commented Oct 18, 2019

Before this PR

One of the main goals of this whole endeavour is to make excavator code-changes pass checkstyle. To achieve this, we don't actually need to reformat people's entire projects, just ensure that the PRs we make have nice linebreaks, don't go past 120 chars etc.

(Full adoption of the formatter everywhere comes with its own benefits, but it's almost orthogonal).

After this PR

==COMMIT_MSG==
The FormatDiffCli class reads the output of git diff -U0 and runs the formatter on modified lines only.
==COMMIT_MSG==

The plan is to run this from a gradle task in baseline, and conceivably even as a pre-commit hook!! (Here's the original python one)

Possible downsides?

  • the original python script that does this had a bunch more configurability - maybe we'll end up wanting this? not sure
  • should probably try and be forwards compatible?

@changelog-app
Copy link

changelog-app bot commented Oct 18, 2019

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

A new FormatDiffCli class reads the output of git diff -U0 and runs the formatter on modified lines only.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from j-baker October 18, 2019 22:29
@iamdanfox iamdanfox requested review from dansanduleac and removed request for j-baker October 18, 2019 22:29
@bulldozer-bot bulldozer-bot bot merged commit a8e5d7f into develop Oct 21, 2019
@bulldozer-bot bulldozer-bot bot deleted the dfox/surgical-rewrite-cli branch October 21, 2019 10:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants