On 6/14/05, Haikal Saadh <[EMAIL PROTECTED]> wrote: > Maybe we could get started by having a Wiki or something where we could > start off by contributing sets of rules that such a framework would look > for?
Good idea. But why bother with a wiki up front? Just go ahead and create the framework. People can add rules through an API. [10:39] *** Patrick has left the conversation. [13:37] *** Patrick has returned to the conversation. Okay, check it out at http://pmcelhaney.weblogs.us/files/cflint.zip <!--- Create the cflint object ---> <cfset cflint = createObject("Component", "CFLint")/> <!--- Add some rules ---> <cfset cflint.addRule(createObject("Component", "ExampleRule"))/> <cfset cflint.addRule(createObject("Component", "RandomRule"))/> <cfset cflint.addRule(createObject("Component", "FileLengthRule").init(1000))/> <!--- Check the target directory ---> <cfset cflint.run(targetDir, false)/> The result is a big ugly page of problems found in the target directory (and subdirectories, if you change that second argument to true). I haven't created any serious rules yet (that's the hard part!) but the framework is in place. Creating rules is pretty straightforward. You just extend Rule.cfc and override the findProblems() method. Have fun! Patrick -- Patrick McElhaney 704.560.9117 http://pmcelhaney.weblogs.us ---------------------------------------------------------- You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com). CFCDev is supported by New Atlanta, makers of BlueDragon http://www.newatlanta.com/products/bluedragon/index.cfm An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
