Home Blog Announcing Acumatica Acuminator 3.1.1

Announcing Acumatica Acuminator 3.1.1

Acuminator 3.1.1 is a small release that concentrates on enhancements and bug fixes in static code analysis.
Sergey Nikomarov | February 21, 2023

Acuminator 3.1.1

We are happy to announce Acuminator version 3.1.1 has been released!

You can now download the new version in the Visual Studio Marketplace. If you have previously installed the beta version of Acuminator, it is better to remove it before installing the new version.

Acuminator 3.1.1 is a small release that concentrates on enhancements and bug fixes in static code analysis. The update’s focus is that we reworked the analysis of Acumatica data type attributes, e.g. PXStringAttribute and the DAC field DB Boundness calculation which allows us to enhance the analysis of DACs and DAC extensions. There are a few other small enhancements we made in this release.  Of course, we also fixed some bugs.

Analysis of Data Type Attributes and DAC Field DB Boundness Calculation

The Acuminator analysis of Acumatica data type attributes have been significantly reworked:

  • Calculation of relationships between Acumatica attributes has been improved
  • The unbound PXVariantAttribute is now supported

The heuristic calculation of a DAC field’s relationship with the database (which we call DB boundness) has been significantly improved:

  • The set of possible DB boundness values has been extended. Previously, Acuminator could calculate only four types of DAC field’s DB boundness: NotDefined, Unbound, DbBound, and Unknown.
    Now Acuminator displays three more values: PXDBScalar, PXDBCalced, Error (for the case when Acuminator can prove that the data type attributes on a DAC field property are declared incorrectly).
  • The new DB boundness values are now displayed in the Code Map for DACs and DAC extensions. The Error value is displayed in the Code Map as “Inconsistent”.
  • The attribute’s DB boundness calculation now supports a complex scenarios involving attributes:
    • Acumatica aggregator attributes. Aggregator attributes are attributes derived from the PXAggregateAttribute class. They are used to combine in one attribute functionality from several attributes.
    • Hybrid data type attributes with mixed DB boundness.  These attributes can be placed on both bound and unbound DAC field properties. They usually have the IsDBField (or NonDB in case of PXDBLocalizableStringAttribute) flag which configures the attribute’s DB boundness. The IsDBField flag may have a default value, also it could be explicitly set on the attribute’s declaration on a DAC field property or on an aggregator attribute. We have several such attributes: PeriodIDAttribute, PXEntityAttribute, and attributes derived from them.
    • Combinations of the previous two scenarios. The heuristic combines attribute’s known default DB boundness with the DB boundness explicitly set on the attribute’s application on a DAC field property or on an aggregator attribute.
  • The DAC field DB boundness is calculated as a combination of DB boundness values of all attributes declared on the DAC field property. Note, that analysis does not support yet complex scenarios with PXMergeAttributesAttribute and other attributes used in Acumatica Framework to customize the attributes applied to the DAC field property.

These changes in our attribute analysis allowed us to improve precision and performance in the following diagnostics.

The precision and performance of the following diagnostics has been improved: PX1019, PX1020, PX1021, PX1023, PX1030, PX1095.

Enhancements in Acuminator Diagnostics

In Acuminator 3.1.1, the following enhancements have been implemented:

  • The PX1042 diagnostic has been changed to reflect the changes in Acumatica Platform. Starting with Acumatica ERP 2023 R1. Acumatica runtime has been changed to allow the execution of database queries in the RowSelecting event handler without a separate connection scope. Therefore, in Acumatica ERP 2023 R1 and later versions, this diagnostic is disabled in Acuminator.
  • The PX1095 diagnostic now supports both PXDBCalcedAttribute and PXDBScalarAttribute attributes. Any of them, when used on a DAC field property, requires an unbound data type attribute like PXStringAttribute placed on the same DAC field property. Previously, Acuminator checked only PXDBCalcedAttribute. Now both attributes are checked.
  • Localization diagnostics PX1050, PX1051, and PX1053 have been enhanced to support the PX.Objects.Common.Exceptions.PXExceptionInfoclass. This class represents a DTO frequently used in Acumatica business logic to store data about exceptions. Localization diagnostics will treat it the same way they treat Acumatica Framework exceptions derived from PXException class as follows:
    • Check that hard-coded strings are not passed as arguments to the PXExceptionInfo constructor calls. Only localizable string constants can be passed to the PXExceptionInfo constructor.
    • Do not report error when the PXExceptionInfo.MessageFormat property is passed to APIs checked by Acuminator localization diagnostics, such as PXException constructor calls.
  • The PX1016 diagnostic has been changed to not check for the IsActive method in graph extensions that include the override of the Configuremethod with the screen configuration and workflows.
  • The PX1018 diagnostic has been updated to not show a warning about abstract graphs and generic graphs that have a generic type parameter as their primary DAC.

Bug Fixes

In this version of Acuminator, the following bugs have been fixed:

  • The published version 3.1 of the Acuminator.Analyzers nuget package was corrupted and did not work. The nuget package is fixed in this release.
  • Other bugfixes in static code analysis and small performance optimizations.

You can find all details about this release in Acuminator Release Notes here:

Happy Coding!

Blog Author

Sergey joined Acumatica in 2017 and started as an application developer on the OEM team, where he did a lot of Acumatica Framework development – along with doing several customizations. An example is a large customization for automated budget control for Censof, an OEM partner. In 2019, he joined the Platform Development team as a system developer. And most recently, Sergey is responsible for Acuminator and our RVT development and maintenance. Participating in a number of internal Acumatica hackathons, Sergey was part of the winning team – along with Vladimir Panchenko – that created Acuminator. In a subsequent hackathon, his team extended it further in developing the Code Map with some other improvements to Acuminator.

Receive blog updates in your Inbox.