I've configured the AppSourceCop.json file like:
{
"mandatoryPrefix": "XXX"
}
If I try to create any table, page, etc. that does not start with XXX, VS Code complains about it.
However, if I add a public method to a standard table (or page), the validator does not complain, so you could end up with several extensions adding the same public method to the object 馃槷
I would add an example, but it is as simple as configuring the validator, checking that it works with the name of a table/page/codeunit, create a table extension, and add a public method.
Tested with versions 3.0.168874 and 4.0.170493 of the AL extension.
In order to not disrupt existing extension, we will introduce this in a separate rule.
@qutreson wasn't this check already added to AS0011 in v5.0.270354 last week? I happened to have a public procedure in a table extension that was not prefixed and AS0011 appeared last week :)
I was going to ask the same. Last week we were about to publish a new version of one of our apps when VS Code updated the AL Extension... and suddenly the app stopped compiling because we had a couple of methods without prefix in table extensions! 馃槄
(I'm not closing it yet because I'm not sure whether the ticket is fully solved or just methods in table extensions)
Yes, that is correct. We originally added it as part of AS0011, but we have reverted the change, because it failed the submissions of many AppSource apps, without really giving time to anyone to adapt to this new validation.
We have then decided to revert the change and we will introduce it as a warning in a new rule. This will give time to everyone to fix their extension code. After a while, we will turn into an error and we will start enforcing it.
The new AL extension from the VS Code marketplace does not validate for it anymore.
OK, makes sense.
Thanks for the clarification!
The new rule validating the use of affixes for extension methods (AS0079) has been added in master and will soon be available in our developer previews.