Companial Cop - PR: Locked Captions, AutoCalcFields, Internal Method Parameter #383
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds three rules
0035 - Built-in methods must have parameters specified explicitly
It analyzes the following methods: Insert, Modify, Delete, Update, and DeleteAll.
All of these methods can be invoked without specifying a parameter and false is then used implicitly for RunTrigger parameter. This can cause issues for maintainance, as it reduces the intentionality of the code. Was trigger intentionally skipped, or was it left out by accident.
0036 - Empty Captions should be Locked.
Analyzes enum values only. If the Caption property is empty, than the caption should be locked so they're not added to the translations file.
0037 - Auto Calc Fields should not be invoked on Normal (non-flow or Blob) fields
If you try to execute SetAutoCalcFields on normal fields, it will throw an error at runtime, so it should be caught already at compile time. The source for this rule follows a different pattern as it was copied from the MS rule for checking that CalcFields isn't invoked on the Normal fields and adjusted for SetAutoCalcFields.