Replies: 5 comments 9 replies
-
@jwikman Good idea, and seems like a easy rule to create. If I'm not mistaken these are the objects that could be set with the
Are there any exceptions to this rule? For example
|
Beta Was this translation helpful? Give feedback.
-
According to the docs for the Extensible property (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/properties/devenv-extensible-property), it applies to these object types:
The default values are Since the |
Beta Was this translation helpful? Give feedback.
-
Oops, I was looking into the SymbolKinds in the compiler itself, which is a long list of objects. An extensible codeunit, what was I thinking 🙈
Completely agree!
I believe it is best to add this exception for the tables, so the rule doesn't get raised unnecessary. I'm going to skip the Enum objects for this rule, because of the default value of false.
On many places in the LinterCop we've need to exclude this type of table. Just checking if we're not overlooking something here. I've tested with the examples below. table 50100 MyTable // raise rule LC0034
{
}
table 50101 MyTable2 // Do not raise rule LC0034
{
Extensible = true;
}
table 50103 MyInternalTable // Do not raise rule LC0034
{
Access = Internal;
}
enum 50100 MyEnum // Do not raise rule LC0034
{
}
report 50100 MyReport // raise rule LC0034
{
}
page 50100 MyPage // raise rule LC0034
{
} Thank you for creating the idea and helping setting the right conditions for this new rule! |
Beta Was this translation helpful? Give feedback.
-
By accident reported a similar issue in combination with AZ AL Dev Tools wizards ... Reading the above, I wonder if it make sense so set it explicitly for enums or not. |
Beta Was this translation helpful? Give feedback.
-
The rule is available in the (pre)release v0.30.7 If you encounter an issue with this new rule, it would be best to create an issue, where I'm going to close of this discussion now the rule is created. @jwikman and @fvet, thank you for the insights on this in the discussion here, much appreciated. |
Beta Was this translation helpful? Give feedback.
-
When you have published a new AppSource app, where there are still some developments going on (you all know about time to market 😉), having to obsolete controls for every little change you need to do on pages can cause some challenges and slows down development.
I rather set
Extensible = false
on the objects until we are ready to let other extend them.But if we miss the Extensible property, we need to go for deprecation of controls or objects before we can do our changes.
I would suggest a new rule: Show a warning if the Extensible property is missing on tables, pages, and reports.
Similar rules are LC0007 and LC0011 which has saved me several times already!
Don't get me wrong, I do like that other extensions can extend our objects - but only when time is right, and we do not cause the other extension issues because of refactoring.
Beta Was this translation helpful? Give feedback.
All reactions