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

New rule: Check extension table fields within range #754

Closed tkroes closed 2 months ago

tkroes commented 2 months ago

I often have problems with colleagues accidentally creating table extension fields that do not belong in the object range defined in the app.json. For example the range would be set from 50400 to 50499 but they create a field with ID 50100. It would be nice if the LinterCop had a rule to check for this (I still find it weird that the Microsoft linters don't), so that errors like these get caught before attempting to publish two extensions with clashing field IDs.

pri-kise commented 2 months ago

Have you checked the rules in this issue? https://github.com/microsoft/AL/issues/7547

They both should check for a matching field id in the latest AL Language Extension.

tkroes commented 2 months ago

PTE0022 does exactly what I want. It seems the default action for that rule is None, but we will apply it as an error in our own ruleset. Thank you for letting me know about this!