Skip to content

Conversation

@SENya1990
Copy link
Contributor

@SENya1990 SENya1990 commented Oct 26, 2025

Implemented diagnostic PX1112 to report generic non-abstract graphs and graph extensions.

Changes Overview

  • Implemented PX1112 analyzer.
  • Implemented PX1112 code fix.
  • Added unit tests for the PX1112 diagnostic and unit tests.
  • Added documentation for PX1112.


## Summary

| Code | Short Description | Type | Code Fix |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EAndrosova please review

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces a new diagnostic PX1112 that enforces that graphs and graph extensions with generic type parameters must be declared as abstract. This prevents improper instantiation of generic graphs/extensions in the Acumatica Framework and ensures correct inheritance patterns. The implementation includes the analyzer, code fix, comprehensive tests, and documentation.

Key changes:

  • Added diagnostic PX1112 to detect non-abstract generic graphs and graph extensions
  • Implemented code fix to add abstract modifier and remove sealed modifier when needed
  • Added comprehensive test coverage for various scenarios including partial types

Reviewed Changes

Copilot reviewed 17 out of 19 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
GraphAndGraphExtensionDeclarationAnalyzer.cs New analyzer that detects generic graphs/extensions missing abstract modifier
TypeModifiersFix.cs Code fix implementation to add abstract and remove sealed modifiers
PXGraphAnalyzer.cs Registered the new declaration analyzer
Descriptors.cs Added PX1112 diagnostic descriptor
Resources.resx Added diagnostic title and code fix message
DiagnosticsShortName.resx Added short name for PX1112
GenericNonAbstractGraphsAndGraphExtensionsTests.cs Test suite covering diagnostic and code fix scenarios
Various test source files Test input and expected output files
PX1112.md Documentation for the diagnostic
Summary.md Added PX1112 to diagnostics summary table
Files not reviewed (2)
  • src/Acuminator/Acuminator.Analyzers/DiagnosticsShortName.Designer.cs: Language not supported
  • src/Acuminator/Acuminator.Analyzers/Resources.Designer.cs: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

| [PX1102](diagnostics/PX1102.md) | The additional delegate parameter of the method with the `PXOverride` attribute must have a name conforming Acumatica naming conventions. | Warning | Available |
| [PX1110](diagnostics/PX1110.md) | The DAC has a DAC field with the `PXDBLocalizableString` attribute. Therefore, this DAC must declare a `NoteID` DAC field. | Error | Available |
| [PX1111](diagnostics/PX1111.md) | The primary DAC of a processing view must contain the `NoteID` field. | Error | Unavailable |
| [PX1112](diagnostics/PX1112.md) | Graphs and graph extensions with generic type parameters must be abstract. | Error | Available |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EAndrosova please review

<data name="PX1111TitleFormat" xml:space="preserve">
<value>The primary DAC "{0}" of the processing view "{1}" must contain the "NoteID" field</value>
</data>
<data name="PX1112Fix" xml:space="preserve">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EAndrosova please review

<data name="PX1111" xml:space="preserve">
<value>MainDacOfProcessingViewMustContainNoteIdField</value>
</data>
<data name="PX1112" xml:space="preserve">
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@EAndrosova please review

@SENya1990
Copy link
Contributor Author

The documentation review will be done in a separate PR

@SENya1990 SENya1990 merged commit b854a25 into dev Nov 3, 2025
@SENya1990 SENya1990 deleted the feature/ATR-728-dev-graph-declaration-diagnostic branch November 3, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants