Welcome Guest, Not a member yet? Register   Sign In
CodeIgniter 3 PHP CodeSniffer
#1

Hey,

Does anyone know of a good CodeSniffer for CodeIgniter 3? I have one for CI 2 that I may just modify as need be, but I was hoping someone may have already created one.

Cheers,



Andrew
Reply
#2

For what?
Reply
#3

(07-27-2016, 05:05 AM)Narf Wrote: For what?

For running against custom CI code and ensuring that it follows CI's style guide, coding standards, etc...

To be clear, this isn't anything that would be included with the core code. It would be for 3rd-party developers and teams to use when creating CI apps and sites.
Reply
#4

I'm not aware of any significant changes to the style guide for CI3 vs. CI2, except that you need to check for ucfirst file/class names on most of the classes.
Reply
#5

(07-27-2016, 09:59 AM)mwhitney Wrote: I'm not aware of any significant changes to the style guide for CI3 vs. CI2, except that you need to check for ucfirst file/class names on most of the classes.

Which is a functional requirement and not just a styleguide change.

You don't need to follow our styleguide in order to run CI.
Reply
#6

(07-28-2016, 02:28 AM)Narf Wrote:
(07-27-2016, 09:59 AM)mwhitney Wrote: I'm not aware of any significant changes to the style guide for CI3 vs. CI2, except that you need to check for ucfirst file/class names on most of the classes.

Which is a functional requirement and not just a styleguide change.

You don't need to follow our styleguide in order to run CI.

I agree, especially since I only follow CI's style guide when I'm writing something I intend to submit to CI. However, it's much easier to do that if I have CodeSniffer configured properly, since my editor is configured to run it every time I save a file.

Although it is a functional requirement rather than a style guide change, CodeSniffer can be configured to check the file/class name to remind you of the functional requirement, so you don't go through the additional steps of attempting to load the page in your dev environment before discovering that you missed the shift key when you typed the file/class name.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB