StefanMaron / BusinessCentral.LinterCop

Community driven code linter for AL (MS Dynamics 365 Business Central)
https://stefanmaron.com
MIT License
76 stars 31 forks source link

LC0054 - Prefix #784

Closed MikkelJensenECIT closed 2 weeks ago

MikkelJensenECIT commented 1 month ago

This rule does not work if the interface has a prefix.

Example:

interface EDK_IExample
{
}
Arthurvdv commented 1 month ago

Prefixes

interface "ABC ISubscriber"

Setting the mandatoryAffixes or mandatoryPrefix in the AppSourceCop.json file will enable this rule to handle prefixes.

https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0054#prefixes

In the wiki for this rule, there is a section about Prefixes. Could it be that the AL project does not have an AppSourceCop.json configured?

MikkelJensenECIT commented 1 month ago

I don't have AppSourceCop enabled though

MikkelJensenECIT commented 1 month ago

Is it possible to do the same with the PerTenantCop?

StefanMaron commented 1 month ago

I always recommend to use all cops.

I have created rulesets to make them work in combination

https://github.com/StefanMaron/RulesetFiles

Arthurvdv commented 1 month ago

I don't have AppSourceCop enabled though

No need for the AppSourceCop itself, but I need the file in the root of the workspace to determine the affix.

Arthurvdv commented 1 month ago

The AppSourceCop itself doesn't need to be enabled. We're only using the config file to retrieve the affixes, avoiding duplicate configuration in case of AppSource development.

I've added this to the documentation (wiki) for this rule. @MikkelJensenECIT, were you able to get it working?