-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
Scenario
- I'm using
CFLint-1.5.0-all.jarwith the VS Code extensionCFLint v0.3.6 - I created an abstract ColdFusion component
aFoo.cfcwith the following contents:
abstract component {
/**
* @hint Gets a dummy string
*/
public string function getBar() output=false {
return 'baz';
}
}Expected behaviour
CFLint should see no problems with this file.
Effective behaviour
- CFLint gives me an error on line 1:
End of statement(;) expected after abstract - CFLint gives me an error on line 12:
End of statement(;) expected after function - CFLint gives me an error on line 12:
End of statement(;) expected after false(This one is not visible in VS Code due being on the same line as the previous one. It can be seen by running CFLint manually, see below.)
Possible workaround
- Remove
abstractfrom the component during development. In my case this causes problems with depencendy injection tho. - Rewrite all abstract components in the
cftagsyntax, where it works.
Additional Information
- Windows 11
- Lucee 5.3.10.97
Generated JSON from runningCFLint-1.5.0-all.jardirectly on the file withjava -jar D:\CFLint\CFLint-1.5.0-all.jar -file D:\my-project\webroot\model\services\aFoo.cfc -jsonin the Windows Terminal
{
"version" : "1.5.0",
"timestamp" : 1715869816,
"issues" : [ {
"severity" : "ERROR",
"id" : "MISSING_SEMI",
"message" : "MISSING_SEMI",
"category" : "CFLINT",
"abbrev" : "MS",
"locations" : [ {
"file" : "D:\\my-project\\webroot\\model\\services\\aFoo.cfc",
"fileName" : "aFoo.cfc",
"function" : "",
"offset" : 7,
"column" : 7,
"line" : 1,
"message" : "End of statement(;) expected after abstract",
"variable" : "abstract",
"expression" : ""
} ]
}, {
"severity" : "ERROR",
"id" : "MISSING_SEMI",
"message" : "MISSING_SEMI",
"category" : "CFLINT",
"abbrev" : "MS",
"locations" : [ {
"file" : "D:\\my-project\\webroot\\model\\services\\aFoo.cfc",
"fileName" : "aFoo.cfc",
"function" : "",
"offset" : 261,
"column" : 22,
"line" : 12,
"message" : "End of statement(;) expected after function",
"variable" : "function",
"expression" : ""
} ]
}, {
"severity" : "ERROR",
"id" : "MISSING_SEMI",
"message" : "MISSING_SEMI",
"category" : "CFLINT",
"abbrev" : "MS",
"locations" : [ {
"file" : "D:\\my-project\\webroot\\model\\services\\aFoo.cfc",
"fileName" : "aFoo.cfc",
"function" : "",
"offset" : 284,
"column" : 45,
"line" : 12,
"message" : "End of statement(;) expected after false",
"variable" : "false",
"expression" : ""
} ]
} ],
"counts" : {
"totalFiles" : 1,
"totalLines" : 18,
"countByCode" : [ {
"code" : "MISSING_SEMI",
"count" : 3
} ],
"countBySeverity" : [ {
"severity" : "ERROR",
"count" : 3
} ]
}
}Metadata
Metadata
Assignees
Labels
No labels