Introduced in version: 1.3 (29 Jan 2020)
Breaking change:
Whitelisting violations is one of the most beloved features in ACR. There is often a compelling reason to justify breaking a rule and it should be possible to whitelist these violations.
To make sure that a violation that is whitelisted stays whitelisted in upcoming revisions a fair bit of data and logic is needed. Starting with this version ACR will gather much more data on whitelisted items. This data will help us in the future to improve the accuracy of the whitelist.
Unfortunately, due to this change, it is not possible to make the whitelist backward-compatible. Any violations currently on the whitelist will be lost and will have to be whitelisted again. To prepare for the upgrade it is strongly recommended to export the whitelist per app:
Improvements:
- consolidated categories and severities for all rules. To keep the charts consistent all downloaded models are re-reviewed.
- it is now possible to open a document (microflow/page) in mendix studio directly from the violations page in ACR
- changing settings for a rule is now possible directly from the violations page
- Rule settings are now a separate page from app settings.
- Adding thins to the whitelist is now easier thanks to the options to:
1) whitelist all app store modules with a single click
2) whitelist multiple violations with a single click - Improved the error handling when synchronizing a project/branch with sprintr, or creating a story in Sprintr. A more helpful error message is shown where possible.
- A review now has an indicator for app rule settings version and whitelist version making it easy to see which revisions might need to be reviewed again. To make it easier to re-review revisions a new option is available on the revisions page.
- New architecture for executing CI/CD jobs which makes them more robust.
New rules:
Find more bugs with these new powerful Reliability rules
- Attributes should not be re-assigned in create/change object
- Chain of “if/else if” statements should have different conditions
- Check for empty string should be done properly
- Delete behaviour should have error message if blue
- Empty variables should not be used in actions that throw null pointer exception
- Entity events should have either no or exactly one handler
- Entity validation rules should have an error message
- Expressions for “then” and “else” in an “if” statement should be different
- Function arguments should be different
- Identical expressions should not be used on both sides of a binary operator
- Lists operations should be passed different arguments
- Objects should not be dereferenced after failing an empty check
- Only non-empty objects should be dereferenced
- Only variables that are not empty should be returned or assigned
- Short-circuit logic should be used correctly to prevent null pointer dereferences in conditionals
- Substring function invocation should make sense
- Variables should not be indirectly compared to empty
- Week year should not be used in date formatting or parsing
- Check for negative conditions in XPath should be done using not instead of !=
- Declared variables should be used
- Imported data should be committed or stored in a variable
- Return expressions for a flow should be different
- Type parameters in a java/script action should be used
- Variables should not be self-assigned
- Returned variables should be used
Improve performance and maintainability with these new rules:
- Microflow retrieve from database and aggregate should be adjacent
- Microflows should commit at the end
- Only short actions should be used in a loop
- Retrieve & aggregate combo should not be nullified by using the list
- Microflow should be simple (cyclomatic complexity)
- Microflow should be simple (Mansystems complexity)
- Microflow should not have loops in the flow
- Microflows should not call themselves
Fixes:
- In some cases, there was an error when deleting an existing model. This is now fixed.
- Fixed a bug that caused the dashboard refresh to not always work.
- Fixed a bug where creating a story in Sprintr would throw a generic error message.
- Fixed a bug where custom error handling would always detect a violation for nanoflows.