Michael Ernst created BCEL-331:
----------------------------------
Summary: Enforce contribution guidelines when committing
Key: BCEL-331
URL: https://issues.apache.org/jira/browse/BCEL-331
Project: Commons BCEL
Issue Type: Bug
Affects Versions: 6.4.1
Reporter: Michael Ernst
Two of the contribution guidelines at https://github.com/apache/commons-bcel#contributing
are:
* Respect the code style.
* Create minimal diffs - disable on save actions like reformat source code or organize imports.
These guidelines are not being respected in the BCEL codebase.
As an example, conisder this commit:
https://github.com/apache/commons-bcel/commit/d7292a3d9f2939f785ec74057d255e5df95846bf
The commit ought to be just a few lines long, but instead it changed every line in two files
by changing the line endings from Unix style to DOS style.
This makes the commit history not helpful for understanding the changes, and it is extremely
disruptive for people who are maintaining forks.
This is not an isolated incident -- there have been many other commits with the same problem.
Could you please put a mechanism in place to encourage developers to follow the guidelines?
Developers should set up their editor to maintain line endings, but that is not currently
happening.
Here are some suggestions:
* add a pre-commit hook that prevents commits that change line endings
* add a pre-commit hook that enforces a uniform line ending style (I don't care whether it
is Unix or DOS, so long as no future commits change it).
* lock the master branch and require code reviews, to catch problems when a developer carelessly
changes line endings
Maybe you have other ideas for enforcing the guidelines; anything that prevents these disruptive
commits from polluting the history would be fine with me.
Thanks!
--
This message was sent by Atlassian Jira
(v8.3.4#803005)