Merged
Conversation
TransferFieldsSchemaCompatibility no longer reports diagnostics for fields with ObsoleteState = Removed, since those fields are not available at runtime and should not be compared. - Add IsObsoleteRemoved() extension to SymbolInterfaceExtensions - Filter out removed fields in both name and type mismatch checks - Add NoDiagnostic test cases for obsolete-removed scenarios Fixes #148 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sion field detection - Fix bug: BuildEffectiveFields now includes table extension fields in the returned collection. Previously they were computed but discarded, so TransferFields() invocations never checked extension fields. - Merge base table and extension fields into a single loop, eliminating duplicate id-range and IsRemoved filters. - Extract FindFieldMismatches with FieldMismatch struct and MismatchKind enum, replacing two duplicated foreach loops. - Extract CreateFieldDiagnostic, consolidating duplicated Diagnostic.Create logic from two ReportField overloads. - Extract IsEitherFieldSuppressed helper for repeated suppression checks. - Add #if NETSTANDARD2_1 guard on FieldMismatch for multi-target compat. - Add 4 new test cases covering extension fields via the invocation path. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Skip obsolete-removed fields in TransferFields analyzers
API pages are machine-readable REST endpoints, not user-facing UI, so captions are irrelevant. Previously only the page-level check skipped API pages while controls and actions inside them were still flagged. Add an IsInApiPage early-return guard in CheckForMissingCaptions that skips all symbols belonging to an API page. Remove the now-redundant SuppressCaptionWarning method and the scattered partial API checks. Closes #131 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix(AC0011): skip CaptionRequired for API pages entirely
Add TestTypeKind enum to EnumProvider and register it in the CasingMismatchIdentifier property value dictionaries. This resolves the false positive FC0002i diagnostic when using the TestType property introduced in BC runtime 16.0. Closes #133 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
feat: add TestType property support to FC0002 casing check
…entation) Skip procedures in codeunits with Subtype = Test to avoid hundreds of noise diagnostics on [Test] methods and handler methods that never serve as public API. Closes #146 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix: exclude test codeunits from DC0004 (PublicProcedureRequiresDocumentation)
…FC0002i Replace manual 47-entry property value dictionaries with dynamic discovery via PropertyInfoLookup.Lookup(), making the analyzer self-maintaining as new AL SDK enum values are added. Resolve property names through SemanticModel (GetSymbolInfo/ GetDeclaredSymbol) instead of static dictionaries, matching VS Code IntelliSense behavior for canonical casing. Batch identifier resolution by grouping on ValueText and resolving one representative per group to reduce GetSymbolInfo calls. Remove FC0002i debug diagnostic from DiagnosticIds, DiagnosticDescriptors, resx, and auto-generated resource class. Reorganize class into algorithm-phase regions: Tree Walk, Inline Resolution, Batched Semantic Resolution, Comparison and Reporting, Static Data. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ider Remove dead code from EnumProvider.cs: - 55 entire nested classes where CanonicalNames was the sole member - 19 CanonicalNames fields from classes with other members - CreateEnumDictionaryByName helper (only caller removed) 5 referenced entries preserved: StyleKind, AttributeKind, AreaKind, ActionAreaKind, PropertyKind. File reduced from 1897 to 1263 lines (33% reduction). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… actions, views, parameters, and properties
Enum.GetValues<T>() is a .NET 5+ API unavailable on netstandard2.1. Added conditional compilation to use the non-generic overload on netstandard2.1 and the generic form on .NET 5+. Files changed: - CasingMismatchIdentifier.cs: wrap two Enum.GetValues<T>() calls - CyclomaticComplexityAndMaintainabilityIndex.cs: add generic form in #else branch, keep non-generic for netstandard2.1 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
refactor(FormattingCop): rewrite CasingMismatchIdentifier
API pages that expose no field controls (e.g., service-only pages with [ServiceEnabled] procedures) no longer trigger PC0026. The rule now returns early when fieldControls is empty. Also fixes a copy-paste error in the test class where _analyzer referenced FilterStringSingleQuoteEscaping instead of MandatoryFieldMissingOnApiPage. Closes #150 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix(PC0026): skip diagnostic on API pages without exposed fields
ObjectType::XmlPort was incorrectly flagged, suggesting Xmlport (lowercase p). The _symbolKindDictionary remaps XmlPort→Xmlport, which is correct for type references (Xmlport::MyXmlport) but wrong for ObjectType member access where the SymbolKind enum canonical form is XmlPort (uppercase P). Add _objectTypeMemberDictionary using raw SymbolKind enum names and use it for right-side comparison when left side is ObjectType. Cherry-picked from 9e698d3 (development) with conflict resolution. Fixes #150 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix(FC0002): use correct XmlPort casing for ObjectType option access
* Fix DC0005 false positive with TryFunction and <returns> tag Move TryFunction attribute detection before the excess return documentation check so that <returns> tags on [TryFunction] methods are not flagged as excess. TryFunction methods have an implicit boolean return, making <returns> documentation valid. Also fix NoDiagnostic/TryFunction.al test to place a marker on <returns> and add a new TryFunctionEmptyReturns test case covering the exact scenario from issue #149. Fixes #149 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * fix: rename procedure MyProcedure to MyTryFunction for consistency --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Change message from 'Enum "{0}" with value 0 must have an empty Name
and Caption.' to 'Enum value "{0}" with ordinal 0 should have an empty
Name and Caption.'
- Enum → Enum value (clarifies it refers to the enum member, not type)
- value 0 → ordinal 0 (avoids overloading 'value')
- must → should (matches Info severity)
Closes #168
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix: clarify AC0019 message format (#168)
Narrow IsFieldBasedOptionAccess() to only match Option fields, not Enum fields. Enum field-based member access (e.g., OtherTable.Field::Value) now falls through to AreFieldCompatible(), which correctly handles enum identity comparison via OriginalDefinition.Equals. This fixes a regression from 8202a13 where cross-table enum field access with the same underlying enum type was incorrectly flagged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix(PC0013): resolve false positive for cross-table enum field access
Pass the full, non-deduplicated source list to Display-Sources.ps1 so the workflow log shows entries from all providers (VSIX, NuGet, BCArtifact) for each version. The deduplicated sources output used by downstream workflows remains unchanged. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Show all sources (pre-dedup) in Display Sources step
String literals matching PageStyle enum values (e.g., 'None', 'Standard') inside method invocations on data-access types no longer trigger LC0086. This fixes false positives like Rec.SetRange(MyField, 'NONE') where the string is a data filter value, not a page style. Suppressed types: Record, RecordRef, FieldRef, Query, Variant, DataTransfer, FilterPageBuilder, TableFilter. Contexts that still flag (by design): if-comparisons, exit statements, assignments to text variables, custom procedure arguments, Message calls. Added FieldRef, DataTransfer, FilterPageBuilder to EnumProvider.NavTypeKind. Added 5 new test cases (2 HasDiagnostic, 3 NoDiagnostic). Closes #154 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
fix(LC0086): suppress false positives on data-access method invocations
… Matched Order Line, and AIT Log Entry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.