# Trailing white space policy

**URL:** <https://forum.ansible.com/t/trailing-white-space-policy/15784>\
**Category:** Ansible Project\
**Created:** [July 25, 2014, 10:31pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784 "2014-07-25T22:31:32Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Berend\_de\_Boer](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@Berend\_de\_Boer](https://forum.ansible.com/u/Berend_de_Boer)\
**Post date:** [July 25, 2014, 10:31pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/1 "2014-07-25T22:31:32Z")

</div>

Hello All,

Would it be a good idea to have a policy that files cannot have trailing white space? The problem is that some editors are set up to remove this automatically, and when changing a file introduce a patch with trailing white space removed.

If files do not have trailing white space (and there is no good reason to have them, then simply using an editor that doesn’t remove them automatically), then this would never be a problem.

That would make contributing to ansible easier: you will never have to tell a person to keep white space. Trailing white space can also be removed automatically upon commit perhaps, so it can never be introduced inadvertedly, or else such a commit can be rejected.

What does ansible think?

All the best,

Berend.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 25, 2014, 10:48pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/2 "2014-07-25T22:48:58Z")

</div>

Ansible doesn’t care about trailing whitespace, and enjoys annoying those that have a problem with it.

We do not accept patches to fix because that breaks line attribution.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [July 26, 2014, 1:03pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/3 "2014-07-26T13:03:09Z")

</div>

turn it off on your editor, but if you contribute any changes remove the trailing whitespace from those lines, eventually most of it will be removed.  
​

---

<div class="post-metadata">

**Author:** ![Berend\_de\_Boer](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@Berend\_de\_Boer](https://forum.ansible.com/u/Berend_de_Boer)\
**Post date:** [July 28, 2014, 9:07pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/4 "2014-07-28T21:07:50Z")

</div>

> if you contribute any changes remove the trailing whitespace from those lines, eventually most of it will be removed.

If there is no policy from now on not to accept trailing white spaces, it will continually be introduced again.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 28, 2014, 9:10pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/5 "2014-07-28T21:10:33Z")

</div>

I think you miss the point where we don’t care about removing trailing whitespace.

So many millions of things that are a better use of our time, in the face of some absolutely awesome contributions and things to work on.

---

<div class="post-metadata">

**Author:** ![Berend\_de\_Boer](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@Berend\_de\_Boer](https://forum.ansible.com/u/Berend_de_Boer)\
**Post date:** [July 28, 2014, 10:09pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/6 "2014-07-28T22:09:44Z")

</div>

I got that loud and clear, and respect that. I simply responded to Brian who thought the trailing white space would disappear with edits over time.

All the best,

Berend.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [July 28, 2014, 10:26pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/7 "2014-07-28T22:26:49Z")

</div>

Just cause they bug me and find excuses to send PRs for code all over ansible 😡

Brian Coca

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 28, 2014, 10:38pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/8 "2014-07-28T22:38:35Z")

</div>

You have discovered my evil scheme to convince you to patch all the things!

---

<div class="post-metadata">

**Author:** ![Brian\_Coca1](https://avatars.discourse-cdn.com/v4/letter/b/278dde/32.png) [@Brian\_Coca1](https://forum.ansible.com/u/Brian_Coca1)\
**Post date:** [July 28, 2014, 10:59pm UTC](https://forum.ansible.com/t/trailing-white-space-policy/15784/9 "2014-07-28T22:59:46Z")

</div>

I KNEW IT!​
