Coding Style Police

Coding Style Police

על ידי Aaron Spike בתאריך
מספר תגובות: 4
I'm really not one to get all bent out of shape about spaces tabs and line endings. But I noticed that the merge conflict I got this morning was the largely the result of line endings changed to Dos style and spaces replaced by tabs in question/format/blackboard_6/format.php.

I quickly checked http://docs.moodle.org/en/Coding to see what was appropriate. There is mention of spaces in preference to tabs. But no mention that I can see of line ending preference.

That leaves me with two questions. What line endings are preferred in Moodle code (eg. in submitted patches)? And is there anybody enforcing these conventions and cleaning up the code periodically?

Let me be the first to say that there are probably more profitable uses of time than enforcing style policies. I ask only because I'm curious.
ממוצע דרוגים: -
בתגובה ל: Aaron Spike

Re: Coding Style Police

על ידי Martin Dougiamas בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Moodle HQ תמונה של Particularly helpful Moodlers תמונה של Plugin developers תמונה של Testers
Unix format (it's point #3 in the coding guide)

We fix them when we find them - please file bugs in the tracker or notify the naughty author, thanks! (you can find the author via http://cvs.moodle.org for example)
בתגובה ל: Martin Dougiamas

Re: Coding Style Police

על ידי Tim Hunt בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Particularly helpful Moodlers תמונה של Peer reviewers תמונה של Plugin developers
I think you'll find that Howard checked it in, but it was some work done by someone in the community. There is a recent thread in the quiz forum. They are good improvements to the file, apart from the whitespace issues.
בתגובה ל: Tim Hunt

Re: Coding Style Police

על ידי Howard Miller בתאריך
תמונה של Core developers תמונה של Documentation writers תמונה של Particularly helpful Moodlers תמונה של Peer reviewers תמונה של Plugin developers
Aaargh.... you got me!

I'll check next time. לשון בחוץ


.....and I'll sort it this time.