Otoh: there are also lots of applications which ru...
# cfml-general
w
Otoh: there are also lots of applications which run in Lucee with only minor modifications.
s
We don't use ORM or any other CF-specific features (anymore) in our current applications, so I think porting to Lucee would be manageable.
z
Lucee has become a lot more compatible in the last few years
biggest thing to be careful is that arrays are passed by reference
s
@zackster that could come back and bite me in the **s 😕 Thanks for the heads up.
b
I actually have yet to have the array-passed-by-reference difference ever bite me on a Lucee conversion, and I've done dozens of them at Ortus.
The simpler and older your app is, the less likley it is to have issues. but really, you just have to try it and work through whatever pops up. Some apps have a lot of little issues, some apps basically just work with no issue.
The CodeChecker CLI has a scanning category that checks for tags not supported by Lucee
s
@bdw429s could you elaborate on this CodeChecker CLI?
b
It's a CommandBox module with a bunch of regex-based checks combined with varscope and query param scanner tools for scanning a code base
There's a bunch of categories of rules you can run, or you can define your own rules in JSON files
s
I'm trying it out with the LuceeMissingTags category, but my syntax must be wrong, not picking it up
Also, when running
codechecker run categories=LuceeMissingTags excelReportPath=C:\prive
I'm getting the following error:
Copy code
ERROR (5.4.2+00453)

Invalid sheet number [1]

The sheetNumber must a whole number between 1 and the total number of sheets in the workbook [0]
C:\Users\<uname>\.CommandBox\cfml\modules\commandbox-codechecker\modules\codechecker-core\models\SpreadSheet\tools.cfm: line 719
717:    if( !this.sheetExists( workbook=workbook,sheetNumber=sheetNumber ) ){
718:            var sheetCount = workbook.getNumberOfSheets();
719:            throw( type=exceptionType,message="Invalid sheet number [#sheetNumber#]",detail="The sheetNumber must a whole number between 1 and the total number of sheets in the workbook [#sheetCount#]" );
720:    }
721: }
b
Ouch, I haven't used the spreadsheet stuff in a hot minute, But it worked the last time I tried. it's possible the're a bug in there
You can leave off the excel report for now and just see the results in the CLi
We'll have to take a look at the spreadsheet logic and see what went wrong there
I think it uses POI directly, but I'd have to check
A newer version of Lucee may affect it differently
s
When I omit the exportPath i only get 15 results, but the category does not say
LuceeMissingTags
. Is that normal behavior?
b
Dunno, I can't see your screen so I don't really know what you're looking at 🙂
s
True, lemme fix that for you, just a sec.
Copy code
CommandBox> codechecker run categories=LuceeMissingTags
 √ | Running CodeChecker
   | √ | Resolving files for scan
   | √ | Polishing ASCII Art
   | √ | Running Rules
   ____ ____ ___  ____ ____ _  _ ____ ____ _  _ ____ ____    
   |    |  | |  \ |___ |    |__| |___ |    |_/  |___ |__/    
   |___ |__| |__/ |___ |___ |  | |___ |___ | \_ |___ |  \    
                                                             

   15 issues found in 1 category using 88 rules.
   ----------------------------------------------------------
   -- 15 issues in VarScoper
   ----------------------------------------------------------

   Export the full results to Excel with the "excelReportPath" parameter.
   See full results with "--verbose | more".
   Filter out lower severity issues with "minSeverity=5"
b
interesting, I actually am getting errors
Copy code
invalid component definition, can't find component [codechecker-core.models.DisabledRulesService]
That shows when I add
--verbose
It's interesting that it seems to have only run the varscoper category for you, which doesn't seem right 🤔
s
I know, right? That's what I don't understand...
b
@satauros ok, sorry for the delay, today was a little crazy
The error I had gotten was just a random bit of nonsense from a borked local install. Disregard.
Your issue was an actual bug that was introduced quite some time ago when I added support for putting your config in a JSON file. The JSON worked, but it was ignoring your command param!
I think I have this fixed.
Please run
Copy code
update --system
and then retry your
Copy code
codechecker run categories=LuceeMissingTags
again. It appears to be working now for me
s
No worries, thank you for taking time looking into this. I ran the update, executed the command, all seems to working afaik now:
Copy code
CommandBox:flexmail-api> codechecker run categories=LuceeMissingTags
 √ | Running CodeChecker
   | √ | Resolving files for scan
   | √ | Aligning Goals
   | √ | Running Rules

   ____ ____ ___  ____ ____ _  _ ____ ____ _  _ ____ ____
   |    |  | |  \ |___ |    |__| |___ |    |_/  |___ |__/
   |___ |__| |__/ |___ |___ |  | |___ |___ | \_ |___ |  \


   0 issues found in 1 category using 22 rules.
   ----------------------------------------------------------
b
Sweet
s
Thanks for you effort, Brad!