Hello,
I'd like to know if next release of symfony could be compatible with
code analyser such as PhpCodeSniffer.
For now, when a project is created, phpcs find 17 errors (see below).
I thinks it'll not be difficult to resolve that and my post could
irritate some people, but it's about quality of code ans phpcs is a very
good tool for this.
So i think that it would be a good thing that only the code written by
developpers would raise errors...
Thanks
Best regards
Fred
$ ./symfony generate:project xxxx
$ phpcs .
--------------
phpcs report:
FILE: ./test/bootstrap/unit.php
--------------------------------------------------------------------------------
FOUND 4 ERROR(S) AND 0 WARNING(S) AFFECTING 3 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | You must use "/**" style comments for a file comment
13 | ERROR | "require_once" is a statement, not a function; no
parentheses are
| | required
15 | ERROR | "include" is a statement, not a function; no parentheses
are
| | required
15 | ERROR | File is being unconditionally included; use "require"
instead
--------------------------------------------------------------------------------
FILE: ./test/bootstrap/functional.php
--------------------------------------------------------------------------------
FOUND 6 ERROR(S) AND 1 WARNING(S) AFFECTING 7 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | You must use "/**" style comments for a file comment
12 | ERROR | Expected "if (...) {\n"; found "if (...)\n{\n"
14 | ERROR | Line indented incorrectly; expected at least 4 spaces,
found 2
15 | ERROR | Line indented incorrectly; expected at least 4 spaces,
found 2
17 | ERROR | Line indented incorrectly; expected at least 4 spaces,
found 2
18 | ERROR | Line indented incorrectly; expected at least 4 spaces,
found 2
22 | WARNING | Line exceeds 85 characters; contains 112 characters
--------------------------------------------------------------------------------
FILE: ./config/ProjectConfiguration.class.php
--------------------------------------------------------------------------------
FOUND 7 ERROR(S) AND 0 WARNING(S) AFFECTING 5 LINE(S)
--------------------------------------------------------------------------------
2 | ERROR | Missing file doc comment
6 | ERROR | Missing class doc comment
8 | ERROR | Line indented incorrectly; expected at least 4 spaces,
found 2
8 | ERROR | Line indented incorrectly; expected 4 spaces, found 2
8 | ERROR | Missing function doc comment
10 | ERROR | Line indented incorrectly; expected at least 8 spaces,
found 4
11 | ERROR | Line indented incorrectly; expected at least 8 spaces,
found 4
--------------------------------------------------------------------------------
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---