[sakai-core-team] whitespace changes

Brian Jones bjones86 at uwo.ca
Fri Feb 27 07:03:21 PST 2015


I don't think we should do a massive re-write of everything to one 
standard; the history is important and if this were going to be done, 
the optimal time to do so would have been during the migration to 
Github, as Sam mentioned.

My original inquiry was geared more towards just cleaning up a single or 
set of files that I'm working on for whatever feature I'm currently 
developing. It just makes my eyes bleed when I see files that have some 
sections using spaces, some sections using tabs, and then sometimes even 
sections with mixed tabs and spaces all in the same lines :( Maybe 
that's just my OCD...

That being said, I'm all for setting a standard going forwards for any 
new files/projects being added. A standard will improve readability of 
code and assist anyone looking at a piece of code for the first time. 
Personally, I'm in favour of spaces over tabs, but we would have to have 
some sort of poll to gauge everyone's opinion.

Brian Jones
Programmer/Analyst
Information Technology Services
Support Services Building, Suite 4300
Western University
(519) 661-2111 x86969
bjones86 at uwo.ca

On 2015-02-27 09:21 AM, Matthew Buckett wrote:
> Accidentally hit send before:
>
> I still feel I get more value from the git blame than I lose from the
> inconsistent formatting. I think it's worthwhile trying to match the
> existing style in a file that's being edited and that a project should
> attempt to be consistent, so if you add a new file to an existing
> project that doesn't mean you can format it how you like, instead you
> should follow the formatting that's already established.
>
> Why don't we at least try to sort of a standard format for all new
> projects going forward so that when we pull in new chunks of code (eg
> Dashboard) we clean them up.
>
> Also if we are going todo a big re-format of history we should do it
> before people start deploying Sakai 11 as once you have local forks
> supporting deployments it's much more disruptive to re-write history
> than it is to tell a few developers to rebase their feature/bug
> branches.
>
>
> On 27 February 2015 at 14:00, Matthew Buckett
> <matthew.buckett at it.ox.ac.uk> wrote:
>> More value from the git blame than I feel I lose from the inconsistent
>> formatting.
>>
>> On 27 February 2015 at 13:49, Bryan Holladay <holladay at longsight.com> wrote:
>>> ha I did notice a lot of JS formatting corrections on my code from you ;)
>>> I'll try better in the future and I blame Eclipse.
>>>
>>> I've always been in the anti-format changing party. It removes the history
>>> (e.g. blame) and makes merging incredibly hard (custom branches, maintenance
>>> branches, etc.). If you are working in a block of code that is formatted
>>> terribly, then go ahead and fix the formatting. If you're just cleaning up,
>>> then don't. Also, don't re-organize imports (no matter how tempting that
>>> is).
>>>
>>> On Thu, Feb 26, 2015 at 5:12 PM, Robert Long <rlong at unicon.net> wrote:
>>>>
>>>> I am all for changing the formatting, etc. as long as it means spaces and
>>>> non-hanging braces are the standard... and actually enforced! (This would go
>>>> along way to curing my code formatting OCD I have...)
>>>>
>>>> Just my 2¢
>>>>
>>>> --Bob
>>>>
>>>> ----
>>>> Robert Long
>>>> Software Engineer
>>>> Technical Account Manager - Sakai
>>>> Unicon, Inc.
>>>>
>>>> ----
>>>> M.A., Instructional Technology
>>>> Saginaw Valley State University
>>>>
>>>> On Feb 26, 2015, at 14:58, Sam Ottenhoff <ottenhoff at longsight.com> wrote:
>>>>
>>>> Ideally, this would have been done during the move from SVN to Git and
>>>> before lots of people forked sakaiproject/sakai.git.  We should have
>>>> globally modified all Java code as described in the link below, and then we
>>>> should have set up a plan to enforce standards via pull request validation.
>>>>
>>>>
>>>> http://stackoverflow.com/questions/4112410/git-change-styling-whitespace-without-changing-ownership-blame
>>>>
>>>> The problem with formatting changes is that it's a history killer.  git
>>>> blame and git diff lose their relevancy.
>>>>
>>>> How upsetting would it be for all of the Git forks if we rewrote the
>>>> entire history as described in that StackOverflow post?
>>>>
>>>> On Mon, Feb 23, 2015 at 12:19 PM, Brian Jones <bjones86 at uwo.ca> wrote:
>>>>>
>>>>> Hi Core Team,
>>>>>
>>>>> What is the best/accepted process for correcting whitespace
>>>>> inconsistencies in file(s) now that we've moved to Github?
>>>>>
>>>>> For example, if I'm working through something, and I notice a file has
>>>>> mixed tabs vs spaces; it's annoying me and I'd like to just fix it.
>>>>>
>>>>> Should I make a PR purely for the whitespace change to keep it separate
>>>>> from the feature I'm working on? Do I need to link it to a new Jira that
>>>>> is only for the whitespace changes?
>>>>>
>>>>> Thanks for your input!
>>>>> --
>>>>> Brian Jones
>>>>> Programmer/Analyst
>>>>> Information Technology Services
>>>>> Support Services Building, Suite 4300
>>>>> Western University
>>>>> (519) 661-2111 x86969
>>>>> bjones86 at uwo.ca
>>>>> _______________________________________________
>>>>> sakai-core-team mailing list
>>>>> sakai-core-team at collab.sakaiproject.org
>>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-core-team
>>>>
>>>>
>>>> _______________________________________________
>>>> sakai-core-team mailing list
>>>> sakai-core-team at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-core-team
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> sakai-core-team mailing list
>>>> sakai-core-team at collab.sakaiproject.org
>>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-core-team
>>>>
>>>
>>>
>>> _______________________________________________
>>> sakai-core-team mailing list
>>> sakai-core-team at collab.sakaiproject.org
>>> http://collab.sakaiproject.org/mailman/listinfo/sakai-core-team
>>>
>>
>>
>>
>> --
>>    Matthew Buckett, VLE Developer, IT Services, University of Oxford
>
>
>


More information about the sakai-core-team mailing list