We are happy to announce Acuminator version 3.1.0 has been released!
You can download the new version in the Visual Studio Marketplace. If you have previously installed the beta version of Acuminator 3.1.0, it is best to remove it before installing the new version.
Acuminator now provides code snippets for DACs, DAC fields, and graph events. A developer can use these code snippets to speed up the writing of new code and avoid common mistakes. You can start using code snippets by typing “DAC” or “_” and selecting the appropriate snippet in the IntelliSense code completion list, as shown in the following screenshot.
When you select a shortcut from the IntelliSense suggestions and press Tab, the system inserts the code snippet, as shown in the following screenshot.
For more details on installing and using the code snippets, see the Acumatica CodeSnippets repository on GitHub.
In Acuminator 3.1.0, the following enhancements have been implemented:
- The PX1062 diagnostic has been added to make sure that graphs and graph extensions do not contain static actions, views, or other static mutable fields and properties.
- The following new diagnostics have been added to prevent errors related to the serialization and deserialization of exceptions:
- The PX1063 diagnostic ensures that the exception classes are derived from System.Exception always declares a serialization constructor.
- The PX1064 diagnostic ensures that the exception classes are derived from System.Exception which declares new serializable data always provideing an override of the GetObjectData method.
- The PX1056 diagnostic has been added to check whether a graph is created in the IsActive or the IsActiveForGraph method in a graph extension or a DAC extension, and warn you if it is.
Enhancements in Code Analysis
The existing diagnostics PX1008 and PX1072 were significantly extended and improved.
Improvements in the PX1008 Diagnostic
The PX1008 diagnostic has been completely reworked. Now this diagnostic implements a complex data flow analysis that goes recursively into methods and checks how the data is transferred to them. The following enhancements have been implemented in the diagnostic:
- Checks to be sure that when adapters of the PXAdapter type are passed to an action delegate in a graph or a graph extension, the adapters are not captured in delegate closures by long-running and processing delegates.
- Improvements in diagnostic messages
- Checks that custom views and attributes capture graph and adapter references in a closure of a long-run delegate
- Bug fixes: The diagnostic displayed a warning when capturing a reference to this in a delegate even in a class that was not a graph or a graph extension
Improvements in the PX1072 Diagnostic
The following fixes have been implemented in the PX1072 diagnostic:
- In static graph members, the declaring graph is no longer considered available for usage in BQL or Fluent BQL queries.
- The diagnostic no longer displays a warning if a single local graph is available and used in a BQL or Fluent BQL query.
- The diagnostic now displays a warning when a class contains multiple BQL or Fluent BQL queries and there are no available graphs—that is, graphs instances that already exist and can be used by a BQL query.
- Support for the complex expressions passed to the SetProcessDelegate API has been added to the PX1008 and PX1086 diagnostics.
- The PX1057 and PX1084 diagnostics now prevent graph creation via a direct constructor call—that is, the new PXGraph() method call.
- The PX1050 and PX1051 localization diagnostics now display fewer false alerts and find more cases of incorrect localization, such as interpolation strings.
In the new release, we fixed a number of serious bugs in the Acuminator diagnostic suppression mechanism that prevented developers from suppressing Acuminator diagnostics. We also fixed several bugs in the static code analysis.
The release also contains other improvements that you can find the details in Acuminator Release Notes: