![]() |
#1 |
Участник
|
waldo: AppSourceCop & mandatoryAffixes
Источник: https://dynamicsuser.net/nav/b/waldo...ndatoryaffixes
============== I recentlyblogged about how to rename files with myVSCode Extension to comply with the newfilename conventions from Microsoft. Somewhat related to that, we need to talk about … Pre-or Suffixing It’sbeen known for a while: pre-or suffixing is necessary to “live in thecloud”. It prevents duplicate namesin various places: duplicate table names, duplicate field names .. things likethat. It is actually very well describedon Microsoft Docs here: https://docs.microsoft.com/en-us/dyn...-prefix-suffix. In short:you need to pre-or suffix, especially for apps on AppSource, but actually onanything you do! AppSourceCop can help (let’s say“force”) you You areprobably familiar with : the codecopwith code analysis rules that are specifically for AppSource. Well .. when you enable this, it can helpyou. And in the next release: it willforce you to remember to set an affix (which means: a suffix or a prefix). You cansimply enable the AppSourceCop by: ![]() ![]() From thedocumentation, it’s quite clear what you need to do:
![]() Done? Well,you’re not done yet. All you’ve donenow, is told the AppSourceCop on which affixes it needs to check the objectsand controls. That way, it can“remind” you that you need to pay attention to it, like here: ![]() Wait .. it’s not going to provide that affix for me?? No! But don’t worry – that’s where I come in;-). You might be familiar with my“CRS AL Language Extension” in VSCode that can handle renames offiles. Well, during the rename, it canprovide a prefix or suffix. So bysimply setting some extra settings for my extension (and yes – by providing thesuffix again), you’ll be able to get this going for you in an automated way: ![]() Thereis a disconnect though … TheAppSourceCop allows multiple affixes .. and my CRS AL Language Extension doesnot. So whenever you intend to usemultiple affixes, I’m afraid you’ll have to disable the automatic rename by myextension, because it will only apply one. Simply remove the settings about the suffix, and provide it manually(AppSourceCop will remind you where ;-)). Even more– if you enable the CodeCop in the next release, you’ll even have another ruleto worry about: file name conventions. So, if you enable codecop: ![]() ![]() Well, Ihad foreseen this setting for it: ![]() In short– auto renaming can become a challenge … :-/ … and that sucks… Staytuned… Headachesthat I intend to solve for you in the near future. This is what I intend to do in short term:
Источник: https://dynamicsuser.net/nav/b/waldo...ndatoryaffixes
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору. |
|
|
|