Comments (12)
+1
I think we should format all git history as well... to prevent huge diffs caused only by format
But needs #27 first
from formatter-maven-plugin.
Re: "I think we should format all git history as well"
Please don't rewrite the history with formatting changes. That would be... very anti-git, and would confuse any attempt to merge existing outstanding work.
A huge diff is perhaps a bit annoying, but it's much more friendly than the alternative.
from formatter-maven-plugin.
The problem I see with the huge diff is that it kills history....
When you need/wanna understand why a change was introduced you wont get the information (at least not in a easy way)
from formatter-maven-plugin.
Understood, but rewriting history is not the answer. A commit which only changes formatting, and introduces no other change, is preferable. It's unfortunate that in some cases, it may make history harder to understand, but the effect is localized, limited in scope and in time. I've used this formatter plugin to reformat other projects in a single commit, and it has rarely been disruptive to the point where history could not be understood. This risk is minimal, and far preferred over the side-effect problems of rewriting history. That's my opinion, anyway.
from formatter-maven-plugin.
I wonder, what is the rewriting history side-effect?
I ask cause I'm about to do it for the ninth time =D
from formatter-maven-plugin.
The main problem is that you can't tell if a branch has already been merged, and it makes it difficult to merge cleanly back into a clone. It creates new history, which separates clones from each other, and makes it difficult to see their common ancestor (fork point). When merging, it can reintroduce the same commits, resulting in duplicates.
If you, and everybody who collaborates with you always use rebase, it's not that bad, but it can confuse rebase because of the difficulty of finding the merge-base.
It also breaks any links directly to a commit, and disassociates the tag history from the branch history.
from formatter-maven-plugin.
It's less important if you do it in your own clone/repos, but if you do it in a repository shared by or used by others, it is quite terrible.
from formatter-maven-plugin.
I see
from formatter-maven-plugin.
what is our default code formatter?
https://github.com/revelc/formatter-maven-plugin/blob/master/src/test/resources/sample-config.xml ?
or something else?
from formatter-maven-plugin.
Made a PR for it.
For start, is just eclipse vanilla formatter
Do you guys agree on that?
from formatter-maven-plugin.
Also, made another PR regarding pom.xml format/order
https://github.com/revelc/formatter-maven-plugin/pull/66/files
from formatter-maven-plugin.
Fixed
from formatter-maven-plugin.
Related Issues (20)
- Drop dependabot in favor of Renovate HOT 3
- Mockito WHEN Bug in Eclipse formatting jdt core 3.32.0 and 3.33.0 HOT 3
- Large whitespace in debug output HOT 9
- Bad format of sealed interfaces extending other interfaces HOT 9
- Option to fail to process invalid setting id HOT 2
- New Configuration hashing into file hash breaks existing caching - only confirmed with XML at the moment HOT 2
- NOTICE: Eclipse 2023-06 Requires jdk 17 for many parts HOT 7
- Eclipse Formatter Attribute Ignored: Parameter After Annotation HOT 1
- Sealed interfaces are not correctly formatted HOT 3
- Not able to run validate due to ExtensionRegistry return null value HOT 4
- False configuration used for line Indentation HOT 2
- lineEnding=KEEP breaks JSON validation on Windows HOT 6
- Report problematic line number in error message HOT 3
- Tab treated as one space for the purpose of line length HOT 3
- Includes are not honored by includeResources
- Rewrite the cache store to match that done on impsort HOT 1
- Please use change log or github releases
- Support 'windows' users for contributions
- No documentation for 'find-transitive-eclipse-updates.sh' and it does not work on windows without additional software
- Next Release: placeholder to prevent release HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from formatter-maven-plugin.