HodorNV / ALOps

ALOps
59 stars 24 forks source link

Add Lintercop.json parameter to use custom code analyzer #602

Closed NAVFreak closed 11 months ago

NAVFreak commented 1 year ago

Is your feature request related to a problem? Please describe. Not a problem in that sense but a problem since I can't change standard behaviour in BCLinterCop

Describe the solution you'd like I would like ALCompile to use my own linterCop.json. Solution is described here, I just need that ALOps, takes the file as a parameter

pri-kise commented 1 year ago

Check out the following issue. https://github.com/HodorNV/ALOps/issues/430 There is a solution for custom Code Analyzers

waldo1001 commented 1 year ago

Thanks @pri-kise.

Just that you know - docs.alops.be is coming... (working on it), and just added this to the list!

NAVFreak commented 1 year ago

Check out the following issue. #430 There is a solution for custom Code Analyzers

@pri-kise , I know, but now they have Compile2 which make custom code analyers work, and it works. We are actually running it right now. I just would like to add a parameter to compile2.

waldo1001 commented 1 year ago

I hope you see that It can become a problem to foresee parameters for every possible custom codecop people come up with. We don't want to be dependent from community projects.

But I do want to work on a "solution" that fits everyone: for example, a docs-page that describes how to include this json file - or how to add a step in yaml to work with it.

waldo1001 commented 1 year ago

We will make it like this:

- task: ALOpsAppCompiler@2
  inputs:
    artifacttype: 'Sandbox'
    versionselect: Weekly
    alternativevsixurl: 'Latest'    # Important!  All CodeCops work against the latest dlls from Microsoft
    alcodeanalyzer: BusinessCentral.LinterCop.dll,LinterCop.json
    ruleset: 'Pipelines\AL\Rulesets\saas.ruleset.json'

Any feedback?

NAVFreak commented 1 year ago

If it works together with this it should be all right 😊 alcodeanalyzer: 'CodeCop,UICop,PerTenantExtensionCop,BusinessCentral.LinterCop.dll'

AdminHodor commented 1 year ago

Dear @NAVFreak ,

Please try our latest release v1.455.3559 which should solve this.

You can add the customer json in the ALAnalyzer list, this will copy the file together with the DLLs.

- task: ALOpsAppCompiler@2
  inputs:
    artifacttype: 'Sandbox'
    versionselect: Weekly
    alternativevsixurl: 'Latest'    # Important!  All CodeCops work against the latest dlls from Microsoft
    alcodeanalyzer: BusinessCentral.LinterCop.dll,LinterCop.json
    ruleset: 'Pipelines\AL\Rulesets\saas.ruleset.json'

Kind regards,