bgarrels / textpattern

Automatically exported from code.google.com/p/textpattern
0 stars 0 forks source link

Implement PRS-0/PSR-1/PSR-2 and automatic styling check #408

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We should use the accepted standard rather than doing our own thing.

* https://github.com/php-fig/fig-standards/tree/master/accepted

Original issue reported on code.google.com by jukka.m.svahn on 5 Apr 2014 at 3:12

GoogleCodeExporter commented 9 years ago
Are we moving over to spaces instead of tabs for indentation throughout the 
whole codebase? I hope so.

Original comment by flaming....@mac.com on 9 Apr 2014 at 8:46

GoogleCodeExporter commented 9 years ago
Yes. Use the provided PHPcs and its config to check styling as outlined in 
CONTRIBUTING.textile (avoid messing with any other tools).

You at first may need to run the check per file due to:

- Textpattern huge source file sizes.
- Amount of syntax errors

Which results in massive runtime and memory usage. You may also want to 
increase PHP's memory limit as high as possible.

Original comment by jukka.svahn@rahinaa.biz on 14 Apr 2014 at 9:06

GoogleCodeExporter commented 9 years ago
The previous is from me.

Original comment by jukka.m.svahn on 14 Apr 2014 at 9:08

GoogleCodeExporter commented 9 years ago
Righto, I've got PHP Coding Standards Fixer (http://cs.sensiolabs.org) which 
seems to work well, but I'm not going to run that over the codebase myself.

I'll update the indentation though, so it reduces the amount of reported syntax 
errors considerably.

Original comment by flaming....@mac.com on 14 Apr 2014 at 8:13

GoogleCodeExporter commented 9 years ago
Using spaces for indent is going to blow the file sizes a bit higher by the 
looks of it. Is that a problem?

Original comment by flaming....@mac.com on 14 Apr 2014 at 9:30

GoogleCodeExporter commented 9 years ago

Original comment by flaming....@mac.com on 14 Apr 2014 at 9:31

GoogleCodeExporter commented 9 years ago
> Using spaces for indent is going to blow the file sizes a bit higher by the 
looks of it. Is that a problem?

No, filesize doesn't matter and files getting bigger is obvious, as each 
indented line gains minimum of three bytes. Indentation and other syntax 
formatting doesn't affect byte code (size).

Original comment by jukka.svahn@rahinaa.biz on 15 Apr 2014 at 7:05

GoogleCodeExporter commented 9 years ago
The previous is from me. Shit keeps resetting to the main Google account (the 
login system has lately been acting funny otherwise too; might be a regression 
from security fixes).

Original comment by jukka.m.svahn on 15 Apr 2014 at 7:11

GoogleCodeExporter commented 9 years ago
I use multiple accounts due to the way Google does repository authentication. 
That fucking plain-text key. WHAT THE FUCK GOOGLE? One of the many reasons to 
migrate somewhere else, on top of the actually shitty centralized SVN and 
reliability of Google Code service.

(I wish Textpattern was using git and on GitHub).

Original comment by jukka.m.svahn on 15 Apr 2014 at 7:19

GoogleCodeExporter commented 9 years ago
OK, I've done as much PSR compliancy work as I'm comfortable with doing, should 
be a lot less syntax errors reporting now. Hopefully that helps you out a bit.

Original comment by flaming....@mac.com on 15 Apr 2014 at 3:46