cflint / CFLint

Static code analysis for CFML (a linter)
BSD 3-Clause "New" or "Revised" License
174 stars 84 forks source link

Lint Error Question #17

Closed GiancarloGomez closed 10 years ago

GiancarloGomez commented 10 years ago

Hello I am testing CFLint for use on my code and the following CFC gives me a FILE_ERROR. In the report it states the following:

In file /EntityDefaults.cfc, line 0 In EntityDefaults.cfc At line : 0 Expression:

and in Sublime I see this:

screen shot 2014-08-17 at 2 34 11 pm

The code is as follows:

/**
* @output           false
* @mappedSuperClass true
* @hint             I define common properties/methods and can be extended by other ORM component
*/
component
{
    // log defaults per table (handled by ormEventhandler)
    property name="createdOn"   ormtype="timestamp" notnull="true";
    property name="updatedOn"   ormtype="timestamp";

    private string function cleanEmoji(required string value){
        local.gotourl   = "http" & (application.useSSL ? "s" : "") & "://" & application.app_domain & "/clean-emoji.php";
        local.php       = new http(url:gotourl,method:"post");
        local.php.addParam(type:"formfield",name:"value",value:arguments.value);
        return trim(local.php.send().getPrefix().fileContent);
    }
}

Any explanation would be greatly appreciated

jjames967 commented 10 years ago

How are you using CFLint? Are you using it as a stand-alone tool or as a library? In other words, how can I recreate the issue?

GiancarloGomez commented 10 years ago

I used it both ways. By running the file check thru my terminal and also thru sublime.

Thank you, Giancarlo Gomez FUSEDEVELOPMENTS C: 305.610.9428 http://fusedevelopments.com http://giancarlogomez.com

From: jjames967 notifications@github.com Reply: cflint/CFLint reply@reply.github.com> Date: August 18, 2014 at 8:58:33 PM To: cflint/CFLint cflint@noreply.github.com> Cc: Giancarlo Gomez jc@fusedevelopments.com> Subject:  Re: [CFLint] Lint Error Question (#17)

How are you using CFLint? Are you using it as a stand-alone tool or as a library? In other words, how can I recreate the issue?

— Reply to this email directly or view it on GitHub.

jjames967 commented 10 years ago

I can't seem to generate the issue. Have you downloaded "https://github.com/cfparser/cfparser" repo, and "mvn clean install"? Then "https://github.com/cflint/CFLint" repo and "mvn clean install"?

GiancarloGomez commented 10 years ago

No I just downloaded the from CFLint-0.1.8.zip from https://github.com/cflint/CFLint/releases

Thank you, Giancarlo Gomez FUSEDEVELOPMENTS C: 305.610.9428 http://fusedevelopments.com http://giancarlogomez.com

From: jjames967 notifications@github.com Reply: cflint/CFLint reply@reply.github.com> Date: August 18, 2014 at 9:13:08 PM To: cflint/CFLint cflint@noreply.github.com> Cc: Giancarlo Gomez jc@fusedevelopments.com> Subject:  Re: [CFLint] Lint Error Question (#17)

I can't seem to generate the issue. Have you downloaded "https://github.com/cfparser/cfparser" repo, and "mvn clean install"? Then "https://github.com/cflint/CFLint" repo and "mvn clean install"?

— Reply to this email directly or view it on GitHub.

jjames967 commented 10 years ago

ah, now I get it. I would highly suggest cloning the newest repository from https://github.com/cflint/CFLint/ and follow the build-instructions. It does require Maven to be installed, but that way you'll be able to make your own rules. I would be happy to answer any questions regarding this.

I'm not sure why that release is failing, but it is. You're not crazy.

GiancarloGomez commented 10 years ago

Cool thanks man .. I will go ahead and clone the newest repo and build locally.

Thank you, Giancarlo Gomez FUSEDEVELOPMENTS C: 305.610.9428 http://fusedevelopments.com http://giancarlogomez.com

From: jjames967 notifications@github.com Reply: cflint/CFLint reply@reply.github.com> Date: August 18, 2014 at 9:48:34 PM To: cflint/CFLint cflint@noreply.github.com> Cc: Giancarlo Gomez jc@fusedevelopments.com> Subject:  Re: [CFLint] Lint Error Question (#17)

ah, now I get it. I would highly suggest cloning the newest repository from https://github.com/cflint/CFLint/ and follow the build-instructions. It does require Maven to be installed, but that way you'll be able to make your own rules. I would be happy to answer any questions regarding this.

I'm not sure why that release is failing, but it is. You're not crazy.

— Reply to this email directly or view it on GitHub.

GiancarloGomez commented 10 years ago

Perfect man it worked! Thanks!!!!

Thank you, Giancarlo Gomez FUSEDEVELOPMENTS C: 305.610.9428 http://fusedevelopments.com http://giancarlogomez.com

From: jjames967 notifications@github.com Reply: cflint/CFLint reply@reply.github.com> Date: August 18, 2014 at 9:48:34 PM To: cflint/CFLint cflint@noreply.github.com> Cc: Giancarlo Gomez jc@fusedevelopments.com> Subject:  Re: [CFLint] Lint Error Question (#17)

ah, now I get it. I would highly suggest cloning the newest repository from https://github.com/cflint/CFLint/ and follow the build-instructions. It does require Maven to be installed, but that way you'll be able to make your own rules. I would be happy to answer any questions regarding this.

I'm not sure why that release is failing, but it is. You're not crazy.

— Reply to this email directly or view it on GitHub.

jjames967 commented 10 years ago

Glad to hear it!