PaycoinFoundation / paycoin

Paycoin
https://paycoin.com
MIT License
42 stars 138 forks source link

Inconsistent White Space #394

Open jwrb opened 8 years ago

jwrb commented 8 years ago

Many files across the repo have inconsistent white space at the top of the file. This is usually under the copyright notices.

We need to have a discussion about whether we want to remove this white space, or include it in every file (for the sake of consistency).

This issue was carried down from Peercoin.

cc: @IngCr3at1on @ligerzero459 @mitchellcash

// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
#ifndef BITCOIN_ALLOCATORS_H
#define BITCOIN_ALLOCATORS_H

vs

// Copyright (c) 2009-2010 Satoshi Nakamoto
// Copyright (c) 2009-2012 The Bitcoin developers
// Distributed under the MIT software license, see the accompanying
// file COPYING or http://www.opensource.org/licenses/mit-license.php.

#ifndef BITCOIN_ALLOCATORS_H
#define BITCOIN_ALLOCATORS_H
ligerzero459 commented 8 years ago

I vote for including the whitespace in every file. I believe it looks cleaner that way

IngCr3at1on commented 8 years ago

As I mentioned in chat to @jwrb I have no strong opinion on this one way or the other but I do agree consistency would be a great idea.

MitchellCash commented 8 years ago

Agree on consistency and side with @ligerzero459 to include the whitespace as it makes the code look cleaner.

Now to watch someone implement this commit and break everyone's build branches when it's merged :P

IngCr3at1on commented 8 years ago

Hahaha, totally @mitchellcash

jwrb commented 8 years ago

My personal opinion is that whitespace at the top looks better. This would however have to be a slowly incremented change so we don't break all current PR's. Perhaps we could set some guidelines for formatting? All future PR's follow them and we can slowly work back through and sort formatting throughout the entire codebase?

IngCr3at1on commented 8 years ago

IMHO even if it does break all outstanding PRs it's not really THAT big of an issue, any conflicts it creates will be extremely easy to resolve and being that we rarely touch the includes or copyright information it's really unlikely that it will break that much.

In regards to styling there's more than just the whitespace after the copyright that would need to be discussed.

MitchellCash commented 8 years ago

Yeah I don't actually mind if you do a massive breaking change. Will be some of the easiest conflicts to fix, if it even conflicts.

But yeah on the topic of styling I have my thoughts. I've actually got most of the work done in a local branch already using .clang-format (I've had it sitting there for a while now so I will have to dust it off again if we are having this discussion)

IngCr3at1on commented 8 years ago

I was just looking at .clang-format yesterday.

MitchellCash commented 8 years ago

What did you think? I can get a pull in

IngCr3at1on commented 8 years ago

I have nothing against .clang-format but since it's a formatting tool I obviously wouldn't be able to say if I agree with the formatting you implemented without seeing it :P (strictly speaking I hate most of the formatting on this repo I just ignore it cause it's a hodgepodge of random bits slapped together with no regards for formatting in the first place).

A formatting PR is a good place to discuss said styling though so yes, go ahead if you like.

MitchellCash commented 8 years ago

Done, see #404