PHPCheckstyle / phpcheckstyle

PHPCheckstyle is an open-source tool that helps PHP programmers adhere to certain coding conventions.
https://github.com/PHPCheckstyle/phpcheckstyle
GNU Lesser General Public License v3.0
164 stars 31 forks source link

Read string as well as a file #5

Open jbrooksuk opened 10 years ago

jbrooksuk commented 10 years ago

Currently PHPCheckstyle is only able to check the style guides against files and not a string itself.

Rather than messing with processFiles, I'm thinking of adding just process as a method itself. This gives the end-developer much more flexibility.

tchule commented 10 years ago

I like the idea, to be able to process any given string would be cool.

We will need to cleanup a few things I think. The "processFiles" method set up some variables and flags (current file name, ...). We can check if we have consistent defaut values for these flags, and when possible eliminate or move all these variables.

jbrooksuk commented 10 years ago

When I was looking at doing this, I realised that processFiles does too much in one method:

We could split out some methods so that they can be re-used by a process method.

tchule commented 10 years ago

Agree, there is some cleanup to do.

jbrooksuk commented 10 years ago

I started looking at this, but quickly realised that there are a lot of changes required.

This requires a big rewrite of the core methods.