StefanMaron / BusinessCentral.LinterCop

Community driven code linter for AL (MS Dynamics 365 Business Central)
https://stefanmaron.com
MIT License
74 stars 30 forks source link

LC0068 - False Positive for tableelement of Integer #744

Open pri-kise opened 1 month ago

pri-kise commented 1 month ago
xmlport 50000 "PTE Import Data"
{
    Caption = 'Import Data';
    Direction = Import;
    FieldDelimiter = '"';
    FieldSeparator = ';';
    Format = VariableText;
    RecordSeparator = '<NewLine>';
    TableSeparator = '<NewLine><NewLine>';
    TextEncoding = UTF8;
    UseRequestPage = false;
    schema
    {
        textelement(root)
        {
            MinOccurs = Zero;
            tableelement(Integer; Integer) //False Positive
            {
                AutoReplace = false;
                AutoSave = false;
                AutoUpdate = false;
                XmlName = 'Vendors';
                textelement(ACCOUNTNUM)
                {
                    MaxOccurs = Once;
                    MinOccurs = Zero;
                    XmlName = 'ACCOUNTNUM';
                }
            //More Fields + Code
            }
        }

    }
}

We have some XmlPorts that have wrong warning on the tableelement line. The warning should't trigger here, since AutoReplace, AutoSave and AutoUpdate are false.

StefanMaron commented 3 weeks ago

Both should be fixed now in the latest pre-release