Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter for PHP_CodeSniffer (coding convention coding standard coding guidelines)

I've made some changes to the sniffs provided by Thomas. I got a bunch of errors on most CI files that I really wanted to get rid of:

1. PEAR's check for a file doc comment didn't allow any non white space between the PHP opening tag and the file doc comment. I've changed that so that code on the same line as the PHP opening tag is ignored. This means that the "if ( ! defined('BASEPATH')) ..." statement can sit right after the PHP opening tag without causing a warning.

2. Thomas' rules would forbid using multi line comments (/* ... */) anywhere unless they are doc block style comments. While this is correct according to the CI style guide, the guide also suggests that the end of file comments should use the multi line style comments for the end of file comments. My changes allows comments beginning with "/* Location:" or "/* End of file " specifically.

I've forked Thomas project on Github to this URL https://github.com/eriktorsner/CodeIgnit...niffer-ETO

Hopefully, I can convince Thomas to include my changes in his repo, but until then, I need to have it on github for my own purposes (build automaton). Feel free to use it and/or fork it.


Messages In This Thread
CodeIgniter for PHP_CodeSniffer (coding convention coding standard coding guidelines) - by El Forum - 11-23-2012, 08:30 AM

Theme © iAndrew 2016 - Forum software by © MyBB