From dec4cf87b8a359b96aeef340baf3a500e8464ca9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20Maro=C5=84?= <stefanmaron@outlook.de> Date: Mon, 15 May 2023 09:57:03 +0200 Subject: [PATCH 01/15] Development (#291) * Update project files * Fix Rule 0011 for table fields #253 * Fix LC0010 does not work in code-workspaces #225 * Analyzer LC0010 should include thresholds in the problems view #261 --- .gitignore | 7 +- .vscode/LoadALLanguage.ps1 | 6 + .vscode/launch.json | 15 + .vscode/tasks.json | 52 ++ AssemblyInfo.cs | 4 - BusinessCentral.LinterCop.csproj | 209 ++--- Design/Rule0009CodeMetrics.cs | 14 +- ...Rule0011AccessPropertyShouldAlwaysBeSet.cs | 11 +- Design/Rule0016CheckForMissingCaptions.cs | 3 +- Helpers/LinterSettings.cs | 11 +- LinterCopAnalyzers.resx | 762 +++++++++--------- app.config | 15 - 12 files changed, 555 insertions(+), 554 deletions(-) create mode 100644 .vscode/LoadALLanguage.ps1 create mode 100644 .vscode/launch.json create mode 100644 .vscode/tasks.json delete mode 100644 app.config diff --git a/.gitignore b/.gitignore index fe7bb2a0..7f62773b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,6 @@ /.vs /bin -/ms-dynamics-smb.al-latest* +/ALLanguage* /obj /packages/System.Composition.AttributedModel.5.0.1/lib /Resources/Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.dll @@ -10,4 +10,7 @@ /packages/System.Composition.AttributedModel.5.0.1 .vscode/** !.vscode/extensions.json -!.vscode/settings.json \ No newline at end of file +!.vscode/settings.json +!.vscode/launch.json +!.vscode/tasks.json +!.vscode/LoadALLanguage.ps1 \ No newline at end of file diff --git a/.vscode/LoadALLanguage.ps1 b/.vscode/LoadALLanguage.ps1 new file mode 100644 index 00000000..2532da54 --- /dev/null +++ b/.vscode/LoadALLanguage.ps1 @@ -0,0 +1,6 @@ +Remove-Item -Path ALLanguage/ -Recurse -Force -ErrorAction SilentlyContinue; +$listing = Invoke-WebRequest -Method POST -UseBasicParsing -Uri https://marketplace.visualstudio.com/_apis/public/gallery/extensionquery?api-version=3.0-preview.1 -Body '{"filters":[{"criteria":[{"filterType":8,"value":"Microsoft.VisualStudio.Code"},{"filterType":12,"value":"4096"},{"filterType":7,"value":"ms-dynamics-smb.al"}],"pageNumber":1,"pageSize":50,"sortBy":0,"sortOrder":0}],"assetTypes":[],"flags":147}' -ContentType application/json | ConvertFrom-Json; +$vsixUrl_Current = $listing.results.extensions.versions | where properties -ne $null | Where-Object { $_.properties.key -notcontains 'Microsoft.VisualStudio.Code.PreRelease'} | Select-Object -First 1 -ExpandProperty files | Where-Object { $_.assetType -eq 'Microsoft.VisualStudio.Services.VSIXPackage'} | Select-Object -ExpandProperty source; +Invoke-WebRequest $vsixUrl_Current -OutFile ALLanguage_current.zip; +Expand-Archive -Path ALLanguage_current.zip -DestinationPath ALLanguage/extension/bin/Analyzers; +Remove-Item -Path ALLanguage_current.zip -Force -ErrorAction SilentlyContinue; \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..cc30d203 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Debug CustomCodeCop", + "type": "coreclr", + "request": "attach", + "preLaunchTask": "build", + "processName": "Microsoft.Dynamics.Nav.EditorServices.Host.exe" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 00000000..9c7b8ee6 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,52 @@ +{ + // See https://go.microsoft.com/fwlink/?LinkId=733558 + // for the documentation about the tasks.json format + "version": "2.0.0", + "tasks": [ + { + "label": "build_dotnet", + "command": "dotnet", + "type": "shell", + "args": [ + "build", + "/property:GenerateFullPaths=true", + "/consoleloggerparameters:NoSummary" + ], + "group": "build", + "problemMatcher": "$msCompile", + "presentation": { + "reveal": "silent", + "revealProblems": "onProblem", + "close": true + } + }, + { + "label": "run_code", + "type": "shell", + "command": "code", + "args": [ + "C:/Users/Stefan/Documents/AL/ALProject1/" + ], + "problemMatcher": [], + "presentation": { + "reveal": "silent", + "revealProblems": "onProblem", + "close": true + } + }, + { + "label": "build", + "dependsOn": [ + "build_dotnet", + "run_code" + ], + "dependsOrder": "sequence" + }, + { + "label": "LoadALLanguageDependency", + "type": "shell", + "command": "Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope Process; ./.vscode/LoadALLanguage.ps1", + "problemMatcher": [] + } + ] +} \ No newline at end of file diff --git a/AssemblyInfo.cs b/AssemblyInfo.cs index f0ce4eb6..64bec08f 100644 --- a/AssemblyInfo.cs +++ b/AssemblyInfo.cs @@ -3,8 +3,4 @@ using System.Runtime.CompilerServices; //[assembly: Extension] -[assembly: NeutralResourcesLanguage("en-US")] -[assembly: AssemblyConfiguration("Release")] -[assembly: AssemblyFileVersion("0.21")] -[assembly: AssemblyInformationalVersion("0.21")] [assembly: AssemblyVersion("0.21")] \ No newline at end of file diff --git a/BusinessCentral.LinterCop.csproj b/BusinessCentral.LinterCop.csproj index cbc97371..2d68fb6e 100644 --- a/BusinessCentral.LinterCop.csproj +++ b/BusinessCentral.LinterCop.csproj @@ -1,132 +1,77 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="15.0"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{1EDDEDCF-E158-4AE6-863D-DEA31B895044}</ProjectGuid> - <OutputType>Library</OutputType> - <AssemblyName>BusinessCentral.LinterCop</AssemblyName> - <ApplicationVersion>7.4.7.37768</ApplicationVersion> - <RootNamespace>BusinessCentral.LinterCop</RootNamespace> - <TargetFrameworkVersion>v4.8</TargetFrameworkVersion> - <FileUpgradeFlags> - </FileUpgradeFlags> - <UpgradeBackupLocation> - </UpgradeBackupLocation> - <OldToolsVersion>2.0</OldToolsVersion> - <TargetFrameworkProfile /> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugSymbols>true</DebugSymbols> - <DebugType>full</DebugType> - <Optimize>false</Optimize> - <DebugType>portable</DebugType> - <OutputPath>bin\Debug\</OutputPath> - <DefineConstants>DEBUG;TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <PlatformTarget>AnyCPU</PlatformTarget> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release\</OutputPath> - <DefineConstants>TRACE</DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <Prefer32Bit>false</Prefer32Bit> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="netstandard" /> - <Reference Include="Microsoft.CodeAnalysis"> - <SpecificVersion>False</SpecificVersion> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/Microsoft.CodeAnalysis.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="Microsoft.Dynamics.Nav.Analyzers.Common"> - <SpecificVersion>False</SpecificVersion> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/Microsoft.Dynamics.Nav.Analyzers.Common.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="Microsoft.Dynamics.Nav.CodeAnalysis"> - <SpecificVersion>False</SpecificVersion> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/Microsoft.Dynamics.Nav.CodeAnalysis.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces"> - <SpecificVersion>False</SpecificVersion> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/Newtonsoft.Json.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="System.Buffers, Version=4.6.28619.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/System.Buffers.dll</HintPath> - </Reference> - <Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> - <SpecificVersion>False</SpecificVersion> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/System.Collections.Immutable.dll</HintPath> - <Private>False</Private> - </Reference> - <Reference Include="System.ComponentModel.Composition" /> - <Reference Include="System.Memory, Version=4.700.19.56404, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/System.Memory.dll</HintPath> - </Reference> - <Reference Include="System.Numerics" /> - <Reference Include="System.Numerics.Vectors, Version=4.6.255193.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/System.Numerics.Vectors.dll</HintPath> - </Reference> - <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.700.20.12001, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> - <HintPath>ms-dynamics-smb.al-latest/extension/bin/Analyzers/System.Runtime.CompilerServices.Unsafe.dll</HintPath> - </Reference> - <Reference Include="System.Xml.Linq" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Design\Rule0001FlowFieldsShouldNotBeEditable.cs" /> - <Compile Include="Design\Rule0002CommitMustBeExplainedByComment.cs" /> - <Compile Include="Design\Rule0003DoNotUseObjectIDsInVariablesOrProperties.cs" /> - <Compile Include="Design\Rule0004LookupPageIdAndDrillDownPageId.cs" /> - <Compile Include="Design\Rule0005VariableCasingShouldNotDIfferFromDeclaration.cs" /> - <Compile Include="Design\Rule0006FieldNotAutoIncrementInTemporaryTable.cs" /> - <Compile Include="Design\Rule0007DataPerCompanyShouldAlwaysBeSet.cs" /> - <Compile Include="Design\Rule0008NoFilterOperatorsInSetRange.cs" /> - <Compile Include="Design\Rule0009CodeMetrics.cs" /> - <Compile Include="Design\Rule0011AccessPropertyShouldAlwaysBeSet.cs" /> - <Compile Include="Design\Rule0012DoNotUseObjectIdInSystemFunctions.cs" /> - <Compile Include="Design\Rule0013CheckForNotBlankOnSingleFieldPrimaryKeys.cs" /> - <Compile Include="Design\Rule0014PermissionSetCaptionLength.cs" /> - <Compile Include="Design\Rule0015PermissionSetCoverage.cs" /> - <Compile Include="Design\Rule0016CheckForMissingCaptions.cs" /> - <Compile Include="Design\Rule0017WriteToFlowField.cs" /> - <Compile Include="Design\Rule0018NoEventsInInternalCodeunits.cs" /> - <Compile Include="Design\Rule0019DataClassificationFieldEqualsTable.cs" /> - <Compile Include="Design\Rule0020ApplicationAreaEqualsToPage.cs" /> - <Compile Include="Design\Rule0021BuiltInMethodImplementThroughCodeunit.cs" /> - <Compile Include="Design\Rule0023AlwaysSpecifyFieldgroups.cs" /> - <Compile Include="Helpers\LinterSettings.cs" /> - <Compile Include="LinterCopAnalyzers.Designer.cs" /> - <Compile Include="LinterCopAnalyzers.Generated.cs" /> - <Compile Include="Extensions.cs" /> - <Compile Include="AssemblyInfo.cs" /> - </ItemGroup> - <ItemGroup> - <EmbeddedResource Include="LinterCopAnalyzers.resx"> - <SubType>Designer</SubType> - </EmbeddedResource> - </ItemGroup> - <ItemGroup> - <None Include="app.config" /> - <None Include="packages.config" /> - <None Include="Properties\Settings.settings"> - <Generator>SettingsSingleFileGenerator</Generator> - <LastGenOutput>Settings.Designer.cs</LastGenOutput> - </None> - </ItemGroup> - <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> -</Project> \ No newline at end of file +<Project Sdk="Microsoft.NET.Sdk"> + + <PropertyGroup> + <TargetFramework>netstandard2.0</TargetFramework> + <ImplicitUsings>enable</ImplicitUsings> + <LangVersion>Latest</LangVersion> + <GenerateAssemblyInfo>false</GenerateAssemblyInfo> + </PropertyGroup> + <ItemGroup> + + <Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/System.Collections.Immutable.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Dynamics.Nav.CodeAnalysis"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Microsoft.Dynamics.Nav.CodeAnalysis.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Dynamics.Nav.Analyzers.Common"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Microsoft.Dynamics.Nav.Analyzers.Common.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Newtonsoft.Json.dll</HintPath> + <Private>False</Private> + </Reference> + <!-- <Reference Include="Microsoft.CodeAnalysis"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Microsoft.CodeAnalysis.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Dynamics.Nav.Analyzers.Common"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Microsoft.Dynamics.Nav.Analyzers.Common.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Dynamics.Nav.CodeAnalysis"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Microsoft.Dynamics.Nav.CodeAnalysis.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Microsoft.Dynamics.Nav.CodeAnalysis.Workspaces.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/Newtonsoft.Json.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="System.Buffers, Version=4.6.28619.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>ALLanguage/extension/bin/Analyzers/System.Buffers.dll</HintPath> + </Reference> + <Reference Include="System.Collections.Immutable, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <SpecificVersion>False</SpecificVersion> + <HintPath>ALLanguage/extension/bin/Analyzers/System.Collections.Immutable.dll</HintPath> + <Private>False</Private> + </Reference> + <Reference Include="System.ComponentModel.Composition"/> + <Reference Include="System.Memory, Version=4.700.19.56404, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL"> + <HintPath>ALLanguage/extension/bin/Analyzers/System.Memory.dll</HintPath> + </Reference> + <Reference Include="System.Numerics"/> + <Reference Include="System.Numerics.Vectors, Version=4.6.255193.3, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>ALLanguage/extension/bin/Analyzers/System.Numerics.Vectors.dll</HintPath> + </Reference> + <Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.700.20.12001, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"> + <HintPath>ALLanguage/extension/bin/Analyzers/System.Runtime.CompilerServices.Unsafe.dll</HintPath> + </Reference> + <Reference Include="System.Xml.Linq"/> --> + </ItemGroup> +</Project> diff --git a/Design/Rule0009CodeMetrics.cs b/Design/Rule0009CodeMetrics.cs index 42096fc2..d85b8f28 100644 --- a/Design/Rule0009CodeMetrics.cs +++ b/Design/Rule0009CodeMetrics.cs @@ -1,9 +1,7 @@ using Microsoft.Dynamics.Nav.CodeAnalysis; using Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics; using Microsoft.Dynamics.Nav.CodeAnalysis.Syntax; -using System; using System.Collections.Immutable; -using System.Linq; using BusinessCentral.LinterCop.Helpers; namespace BusinessCentral.LinterCop.Design @@ -19,29 +17,29 @@ public override void Initialize(AnalysisContext context) private void CheckCodeMetrics(CodeBlockAnalysisContext context) { if (context.OwningSymbol.GetContainingObjectTypeSymbol().IsObsoletePending || context.OwningSymbol.GetContainingObjectTypeSymbol().IsObsoleteRemoved) return; - if (context.OwningSymbol.IsObsoletePending ||context.OwningSymbol.IsObsoleteRemoved) return; + if (context.OwningSymbol.IsObsoletePending || context.OwningSymbol.IsObsoleteRemoved) return; if (context.OwningSymbol.GetContainingObjectTypeSymbol().NavTypeKind == NavTypeKind.Interface || context.OwningSymbol.GetContainingObjectTypeSymbol().NavTypeKind == NavTypeKind.ControlAddIn) return; int cyclomaticComplexity = GetCyclomaticComplexity(context.CodeBlock); double HalsteadVolume = GetHalsteadVolume(context.CodeBlock, ref context, cyclomaticComplexity); - LinterSettings.Create(); + LinterSettings.Create(context.SemanticModel.Compilation.FileSystem.GetDirectoryPath()); if (LinterSettings.instance != null) if (cyclomaticComplexity >= LinterSettings.instance.cyclomaticComplexityThreshold || Math.Round(HalsteadVolume) <= LinterSettings.instance.maintainabilityIndexThreshold) { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0010CodeMetricsWarning, context.OwningSymbol.GetLocation(), new object[] { cyclomaticComplexity, Math.Round(HalsteadVolume) })); + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0010CodeMetricsWarning, context.OwningSymbol.GetLocation(), new object[] { cyclomaticComplexity, LinterSettings.instance.cyclomaticComplexityThreshold, Math.Round(HalsteadVolume), LinterSettings.instance.maintainabilityIndexThreshold })); return; } if (cyclomaticComplexity >= LinterSettings.instance.cyclomaticComplexityThreshold || Math.Round(HalsteadVolume) <= LinterSettings.instance.maintainabilityIndexThreshold) { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0010CodeMetricsWarning, context.OwningSymbol.GetLocation(), new object[] { LinterSettings.instance.cyclomaticComplexityThreshold, Math.Round(HalsteadVolume) })); + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0010CodeMetricsWarning, context.OwningSymbol.GetLocation(), new object[] { cyclomaticComplexity, LinterSettings.instance.cyclomaticComplexityThreshold, Math.Round(HalsteadVolume), LinterSettings.instance.maintainabilityIndexThreshold })); return; } - context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0009CodeMetricsInfo, context.OwningSymbol.GetLocation(), new object[] { cyclomaticComplexity, Math.Round(HalsteadVolume)})); + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0009CodeMetricsInfo, context.OwningSymbol.GetLocation(), new object[] { cyclomaticComplexity, LinterSettings.instance.cyclomaticComplexityThreshold, Math.Round(HalsteadVolume), LinterSettings.instance.maintainabilityIndexThreshold })); } - private static double GetHalsteadVolume(SyntaxNode CodeBlock, ref CodeBlockAnalysisContext context,int cyclomaticComplexity) + private static double GetHalsteadVolume(SyntaxNode CodeBlock, ref CodeBlockAnalysisContext context, int cyclomaticComplexity) { try { diff --git a/Design/Rule0011AccessPropertyShouldAlwaysBeSet.cs b/Design/Rule0011AccessPropertyShouldAlwaysBeSet.cs index 96693a09..44bf140a 100644 --- a/Design/Rule0011AccessPropertyShouldAlwaysBeSet.cs +++ b/Design/Rule0011AccessPropertyShouldAlwaysBeSet.cs @@ -1,6 +1,5 @@ using Microsoft.Dynamics.Nav.CodeAnalysis; using Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics; -using System; using System.Collections.Immutable; using BusinessCentral.LinterCop.Helpers; using Microsoft.Dynamics.Nav.Analyzers.Common.AppSourceCopConfiguration; @@ -24,16 +23,18 @@ private void CheckForMissingAccessProperty(SymbolAnalysisContext context) if (context.Symbol.IsObsoletePending || context.Symbol.IsObsoleteRemoved) return; if (context.Symbol.Kind == SymbolKind.Field) { - LinterSettings.Create(); + if (context.Symbol.ContainingSymbol.GetContainingObjectTypeSymbol().IsObsoletePending || context.Symbol.ContainingSymbol.GetContainingObjectTypeSymbol().IsObsoleteRemoved) return; + LinterSettings.Create(context.Compilation.FileSystem.GetDirectoryPath()); if (LinterSettings.instance.enableRule0011ForTableFields) { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0011AccessPropertyShouldAlwaysBeSet, context.Symbol.GetLocation())); + if (context.Symbol.GetProperty(PropertyKind.Access) == null) + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0011AccessPropertyShouldAlwaysBeSet, context.Symbol.GetLocation())); } } else - if (context.Symbol.GetProperty(PropertyKind.Access) == null) { - context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0011AccessPropertyShouldAlwaysBeSet, context.Symbol.GetLocation())); + if (context.Symbol.GetProperty(PropertyKind.Access) == null) + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0011AccessPropertyShouldAlwaysBeSet, context.Symbol.GetLocation())); } } diff --git a/Design/Rule0016CheckForMissingCaptions.cs b/Design/Rule0016CheckForMissingCaptions.cs index f97b3a16..2abe6551 100644 --- a/Design/Rule0016CheckForMissingCaptions.cs +++ b/Design/Rule0016CheckForMissingCaptions.cs @@ -1,7 +1,6 @@ using BusinessCentral.LinterCop.Helpers; using Microsoft.Dynamics.Nav.CodeAnalysis; using Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics; -using System; using System.Collections.Immutable; namespace BusinessCentral.LinterCop.Design @@ -27,7 +26,7 @@ private void CheckForMissingCaptions(SymbolAnalysisContext context) if (context.Symbol.IsObsoletePending || context.Symbol.IsObsoleteRemoved) return; if (context.Symbol.GetContainingObjectTypeSymbol().IsObsoletePending || context.Symbol.GetContainingObjectTypeSymbol().IsObsoleteRemoved) return; - LinterSettings.Create(); + LinterSettings.Create(context.Compilation.FileSystem.GetDirectoryPath()); if (!(LinterSettings.instance.enableRule0016ForApiObjects) && context.Symbol.GetContainingObjectTypeSymbol().GetProperty(PropertyKind.PageType) != null) { if (context.Symbol.Kind == SymbolKind.Page) diff --git a/Helpers/LinterSettings.cs b/Helpers/LinterSettings.cs index 625167d1..13a3c1c4 100644 --- a/Helpers/LinterSettings.cs +++ b/Helpers/LinterSettings.cs @@ -1,5 +1,4 @@ -using System.IO; -using Newtonsoft.Json; +using Newtonsoft.Json; namespace BusinessCentral.LinterCop.Helpers { @@ -9,15 +8,16 @@ class LinterSettings public int maintainabilityIndexThreshold = 20; public bool enableRule0011ForTableFields = false; public bool enableRule0016ForApiObjects = false; + public string WorkingDir = ""; static public LinterSettings instance; - static public void Create() + static public void Create(string WorkingDir) { - if (instance == null) + if (instance == null || instance.WorkingDir != WorkingDir) { try { - StreamReader r = File.OpenText("LinterCop.json"); + StreamReader r = File.OpenText(Path.Combine(WorkingDir, "LinterCop.json")); string json = r.ReadToEnd(); r.Close(); instance = new LinterSettings(); @@ -27,6 +27,7 @@ static public void Create() instance.maintainabilityIndexThreshold = internalInstance.maintainabilityIndexThreshold ?? internalInstance.maintainablityIndexThreshold ?? instance.maintainabilityIndexThreshold; instance.enableRule0011ForTableFields = internalInstance.enableRule0011ForTableFields; instance.enableRule0016ForApiObjects = internalInstance.enableRule0016ForApiObjects; + instance.WorkingDir = WorkingDir; } catch { diff --git a/LinterCopAnalyzers.resx b/LinterCopAnalyzers.resx index 972e2888..effa7cc1 100644 --- a/LinterCopAnalyzers.resx +++ b/LinterCopAnalyzers.resx @@ -1,385 +1,385 @@ <?xml version="1.0" encoding="utf-8"?> <root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> - <xsd:element name="root" msdata:IsDataSet="true"> - <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> + <xsd:element name="root" msdata:IsDataSet="true"> <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0"/> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string"/> - <xsd:attribute name="type" type="xsd:string"/> - <xsd:attribute name="mimetype" type="xsd:string"/> - <xsd:attribute ref="xml:space"/> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string"/> + <xsd:attribute name="type" type="xsd:string"/> + <xsd:attribute name="mimetype" type="xsd:string"/> + <xsd:attribute ref="xml:space"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string"/> + <xsd:attribute name="name" type="xsd:string"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/> + <xsd:attribute ref="xml:space"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required"/> + </xsd:complexType> + </xsd:element> + </xsd:choice> </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string"/> - <xsd:attribute name="name" type="xsd:string"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/> - <xsd:attribute ref="xml:space"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required"/> - </xsd:complexType> - </xsd:element> - </xsd:choice> - </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="AnalyzerPrefix" xml:space="preserve"> - <value>LC</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableDescription" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableFormat" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableTitle" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentDescription" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentFormat" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentTitle" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration. Use {1} instead.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesTitle" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration.</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdDescription" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdFormat" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table "{1}" because it is used in page "{2}" (list)</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdTitle" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription" xml:space="preserve"> - <value>Wrong casing detected!</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat" xml:space="preserve"> - <value>Wrong casing detected! Use {0} instead.</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle" xml:space="preserve"> - <value>Wrong casing detected!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableDescription" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableFormat" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableTitle" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetDescription" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetFormat" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetTitle" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeDescription" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeFormat" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeTitle" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoDescription" xml:space="preserve"> - <value>Cyclomatic complexity and Maintainability index</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoFormat" xml:space="preserve"> - <value>Cyclomatic complexity: {0}, Maintainability index: {1}</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoTitle" xml:space="preserve"> - <value>Cyclomatic complexity and Maintainability index</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetDescription" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetFormat" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetTitle" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsDescription" xml:space="preserve"> - <value>Wrong Parameter detected.</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsFormat" xml:space="preserve"> - <value>Wrong Parameter detected. Select the correct object with "{0}::" instead.</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsTitle" xml:space="preserve"> - <value>Wrong Parameter detected.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthDescription" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed the maximum length.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthFormat" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed {0} characters. Use MaxLength={0} or Locked=true to ensure there are no translations that exceed this limit.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthTitle" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed the maximum length.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageDescription" xml:space="preserve"> - <value>All application objects should be covered by at least one permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageFormat" xml:space="preserve"> - <value>The application object {0} "{1}" is not covered by any permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageTitle" xml:space="preserve"> - <value>All application objects should be covered by at least one permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsDescription" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsFormat" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsTitle" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldFormat" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldDescription" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldTitle" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleTitle" xml:space="preserve"> - <value>There was an error in a Linter Rule</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleDecription" xml:space="preserve"> - <value>There was an error in a Linter Rule</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleFormat" xml:space="preserve"> - <value>There was an Error in Rule "{0}" of type "{1}" {2}</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsDescription" xml:space="preserve"> - <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsFormat" xml:space="preserve"> - <value>The event {0} is declared in an internal codeunit {1}. Avoid events in internal codeunits as they are not accessible to extensions.</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsTitle" xml:space="preserve"> - <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableTitle" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableDescription" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableFormat" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageTitle" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageFormat" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageDescription" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0021ConfirmImplementConfirmManagement" xml:space="preserve"> - <value>Confirm() must be implemented through the "Confirm Management" codeunit from the System Application.</value> - <comment/> - </data> - <data name="Rule0023AlwaysSpecifyFieldgroups" xml:space="preserve"> - <value>Fieldgroup "{0}" is missing on table "{1}".</value> - <comment/> - </data> - <data name="Fix0021ConfirmImplementConfirmManagementMessage" xml:space="preserve"> - <value>Refactor to Confirm Management</value> - <comment/> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperDescription" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperFormat" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperTitle" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> -</root> \ No newline at end of file + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="AnalyzerPrefix" xml:space="preserve"> + <value>LC</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableDescription" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableFormat" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableTitle" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentDescription" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentFormat" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentTitle" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration. Use {1} instead.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesTitle" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration.</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdDescription" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdFormat" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table "{1}" because it is used in page "{2}" (list)</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdTitle" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription" xml:space="preserve"> + <value>Wrong casing detected!</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat" xml:space="preserve"> + <value>Wrong casing detected! Use {0} instead.</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle" xml:space="preserve"> + <value>Wrong casing detected!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableDescription" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableFormat" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableTitle" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetDescription" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetFormat" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetTitle" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeDescription" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeFormat" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeTitle" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoDescription" xml:space="preserve"> + <value>Cyclomatic complexity and Maintainability index</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoFormat" xml:space="preserve"> + <value>Cyclomatic complexity: {0}/({1}), Maintainability index: {2}/({3})</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoTitle" xml:space="preserve"> + <value>Cyclomatic complexity and Maintainability index</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetDescription" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetFormat" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetTitle" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsDescription" xml:space="preserve"> + <value>Wrong Parameter detected.</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsFormat" xml:space="preserve"> + <value>Wrong Parameter detected. Select the correct object with "{0}::" instead.</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsTitle" xml:space="preserve"> + <value>Wrong Parameter detected.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthDescription" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed the maximum length.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthFormat" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed {0} characters. Use MaxLength={0} or Locked=true to ensure there are no translations that exceed this limit.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthTitle" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed the maximum length.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageDescription" xml:space="preserve"> + <value>All application objects should be covered by at least one permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageFormat" xml:space="preserve"> + <value>The application object {0} "{1}" is not covered by any permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageTitle" xml:space="preserve"> + <value>All application objects should be covered by at least one permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsDescription" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsFormat" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsTitle" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldFormat" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldDescription" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldTitle" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleTitle" xml:space="preserve"> + <value>There was an error in a Linter Rule</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleDecription" xml:space="preserve"> + <value>There was an error in a Linter Rule</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleFormat" xml:space="preserve"> + <value>There was an Error in Rule "{0}" of type "{1}" {2}</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsDescription" xml:space="preserve"> + <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsFormat" xml:space="preserve"> + <value>The event {0} is declared in an internal codeunit {1}. Avoid events in internal codeunits as they are not accessible to extensions.</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsTitle" xml:space="preserve"> + <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableTitle" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableDescription" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableFormat" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageTitle" xml:space="preserve"> + <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageFormat" xml:space="preserve"> + <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageDescription" xml:space="preserve"> + <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0021ConfirmImplementConfirmManagement" xml:space="preserve"> + <value>Confirm() must be implemented through the "Confirm Management" codeunit from the System Application.</value> + <comment/> + </data> + <data name="Rule0023AlwaysSpecifyFieldgroups" xml:space="preserve"> + <value>Fieldgroup "{0}" is missing on table "{1}".</value> + <comment/> + </data> + <data name="Fix0021ConfirmImplementConfirmManagementMessage" xml:space="preserve"> + <value>Refactor to Confirm Management</value> + <comment/> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperDescription" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperFormat" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperTitle" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + </data> +</root> diff --git a/app.config b/app.config deleted file mode 100644 index 14a4db72..00000000 --- a/app.config +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<configuration> - <runtime> - <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> - <dependentAssembly> - <assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> - <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/> - </dependentAssembly> - <dependentAssembly> - <assemblyIdentity name="System.Composition.AttributedModel" publicKeyToken="b03f5f7f11d50a3a" culture="neutral"/> - <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0"/> - </dependentAssembly> - </assemblyBinding> - </runtime> -<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6"/></startup></configuration> From cdcbfca2445f2df58a4a222d6f56ccfba35e39a0 Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Mon, 15 May 2023 10:01:21 +0200 Subject: [PATCH 02/15] dotnet restore --- .github/workflows/build.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe28c4cc..e5f916f4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,8 @@ jobs: uses: actions/setup-dotnet@v1 with: dotnet-version: 6.0.* + - name: Restore dependencies + run: dotnet restore - name: GetALVsixVersionAndURL id: get-vsix run: > From e28dd78e31a3f81280d67b5487e11416766f63a5 Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Mon, 15 May 2023 10:05:51 +0200 Subject: [PATCH 03/15] update artifact path --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e5f916f4..4dc71ded 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,7 +100,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: bin\Debug\BusinessCentral.LinterCop.dll + asset_path: bin/Debug/netstandard2.0/BusinessCentral.LinterCop.dll asset_name: BusinessCentral.LinterCop.current.dll asset_content_type: application/octet-stream @@ -115,7 +115,7 @@ jobs: uses: actions/upload-artifact@v2.2.4 with: name: BusinessCentral.LinterCop.next.dll - path: bin\Debug\BusinessCentral.LinterCop.dll + path: bin/Debug/netstandard2.0/BusinessCentral.LinterCop.dll - name: Remove a Release Asset next uses: flcdrg/remove-release-asset-action@v1.0.13 env: From 64be508dc1d7767a70e11946d59cbf2447ca717e Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Mon, 15 May 2023 10:10:07 +0200 Subject: [PATCH 04/15] change asset path --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4dc71ded..70b9ffd9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -130,6 +130,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: bin\Debug\BusinessCentral.LinterCop.dll + asset_path: bin/Debug/netstandard2.0/BusinessCentral.LinterCop.dll asset_name: BusinessCentral.LinterCop.next.dll asset_content_type: application/octet-stream From 89d9499a926ab1a934b5710315574cc85d9bfa37 Mon Sep 17 00:00:00 2001 From: Arthur <44637996+Arthurvdv@users.noreply.github.com> Date: Mon, 15 May 2023 13:35:20 +0200 Subject: [PATCH 05/15] Add exclusion for tables of type Setup for Rule LC0023 (#286) * Add exclusion for tables of type Setup * Change implementation of IsTableOfTypeSetupTable to PrimaryKey --------- Co-authored-by: Arthur van de Vondervoort <arthur.vandevondervoort@vanroey.be> --- Design/Rule0023AlwaysSpecifyFieldgroups.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Design/Rule0023AlwaysSpecifyFieldgroups.cs b/Design/Rule0023AlwaysSpecifyFieldgroups.cs index 8e5e4b79..a7c5f81f 100644 --- a/Design/Rule0023AlwaysSpecifyFieldgroups.cs +++ b/Design/Rule0023AlwaysSpecifyFieldgroups.cs @@ -1,5 +1,6 @@ using Microsoft.Dynamics.Nav.CodeAnalysis; using Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics; +using Microsoft.Dynamics.Nav.CodeAnalysis.Symbols; using Microsoft.Dynamics.Nav.CodeAnalysis.Text; using System; using System.Collections.Immutable; @@ -20,6 +21,7 @@ private void CheckFieldgroups(SymbolAnalysisContext ctx) try { ITableTypeSymbol table = (ITableTypeSymbol)ctx.Symbol; + if (IsTableOfTypeSetupTable(table)) return; Location FieldGroupLocation = table.GetLocation(); if (!table.Keys.IsEmpty) @@ -40,5 +42,19 @@ private void CheckFieldgroups(SymbolAnalysisContext ctx) ctx.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0000ErrorInRule, ctx.Symbol.GetLocation(), new Object[] { "Rule0023", "ArgumentOutOfRangeException", "" })); } } + + private static bool IsTableOfTypeSetupTable(ITableTypeSymbol table) + { + // Expect Primary Key to contains only one field + if (table.PrimaryKey.Fields.Length != 1) return (false); + + // The field should be of type Code + if (table.PrimaryKey.Fields[0].GetTypeSymbol().GetNavTypeKindSafe() != NavTypeKind.Code) return (false); + + // The field should be exactly (case sensitive) called 'Primary Key' + if (table.PrimaryKey.Fields[0].Name != "Primary Key") return (false); + + return (true); + } } } From f98012aef5969f8eeddbb0622ed3747a6d9d623d Mon Sep 17 00:00:00 2001 From: Arthur <44637996+Arthurvdv@users.noreply.github.com> Date: Fri, 7 Jul 2023 08:16:29 +0200 Subject: [PATCH 06/15] Fix typo (#294) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Arthur van de Vondervoort <arthur.vandevondervoort@vanroey.be> Co-authored-by: Stefan Maroń <stefanmaron@outlook.de> --- LinterCopAnalyzers.resx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LinterCopAnalyzers.resx b/LinterCopAnalyzers.resx index effa7cc1..0c77934f 100644 --- a/LinterCopAnalyzers.resx +++ b/LinterCopAnalyzers.resx @@ -350,15 +350,15 @@ <comment/> </data> <data name="Rule0020ApplicationAreaEqualsToPageTitle" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> <comment/> </data> <data name="Rule0020ApplicationAreaEqualsToPageFormat" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> <comment/> </data> <data name="Rule0020ApplicationAreaEqualsToPageDescription" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> <comment/> </data> <data name="Rule0021ConfirmImplementConfirmManagement" xml:space="preserve"> From 3d4ef33c7d745ad0d94f9e757326e58a873d1a48 Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Fri, 8 Sep 2023 12:25:19 +0200 Subject: [PATCH 07/15] Fix breaking change in v12 --- LinterCopAnalyzers.Generated.cs | 48 ++++++++++++++++----------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/LinterCopAnalyzers.Generated.cs b/LinterCopAnalyzers.Generated.cs index fd54ced5..7ab7084c 100644 --- a/LinterCopAnalyzers.Generated.cs +++ b/LinterCopAnalyzers.Generated.cs @@ -5,30 +5,30 @@ namespace BusinessCentral.LinterCop { public static class DiagnosticDescriptors { - public static readonly DiagnosticDescriptor Rule0000ErrorInRule = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0000", (LocalizableString)new LocalizableResourceString("Rule0000ErrorInRuleTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0000ErrorInRuleFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0000ErrorInRuleDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0000", Array.Empty<string>()); + public static readonly DiagnosticDescriptor Rule0000ErrorInRule = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0000", (LocalizableString)new LocalizableResourceString("Rule0000ErrorInRuleTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0000ErrorInRuleFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0000ErrorInRuleDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0000"); - public static readonly DiagnosticDescriptor Rule0001FlowFieldsShouldNotBeEditable = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0001", (LocalizableString)new LocalizableResourceString("Rule0001FlowFieldsShouldNotBeEditable", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0001FlowFieldsShouldNotBeEditableFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0001FlowFieldsShouldNotBeEditableDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0001", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0002CommitMustBeExplainedByComment = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0002", (LocalizableString)new LocalizableResourceString("Rule0002CommitMustBeExplainedByComment", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0002CommitMustBeExplainedByCommentFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0002CommitMustBeExplainedByCommentDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0002", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0003DoNotUseObjectIDsInVariablesOrProperties = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0003", (LocalizableString)new LocalizableResourceString("Rule0003DoNotUseObjectIDsInVariablesOrProperties", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0003", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0004LookupPageIdAndDrillDownPageId = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0004", (LocalizableString)new LocalizableResourceString("Rule0004LookupPageIdAndDrillDownPageIdTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0004LookupPageIdAndDrillDownPageIdFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0004LookupPageIdAndDrillDownPageIdDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0004", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0005VariableCasingShouldNotDIfferFromDeclaration = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0005", (LocalizableString)new LocalizableResourceString("Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0005", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0006FieldNotAutoIncrementInTemporaryTable = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0006", (LocalizableString)new LocalizableResourceString("Rule0006FieldNotAutoIncrementInTemporaryTableTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0006FieldNotAutoIncrementInTemporaryTableFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Error, true, (LocalizableString)new LocalizableResourceString("Rule0006FieldNotAutoIncrementInTemporaryTableDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0006", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0007DataPerCompanyShouldAlwaysBeSet = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0007", (LocalizableString)new LocalizableResourceString("Rule0007DataPerCompanyShouldAlwaysBeSetTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0007DataPerCompanyShouldAlwaysBeSetFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Hidden, false, (LocalizableString)new LocalizableResourceString("Rule0007DataPerCompanyShouldAlwaysBeSetDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0007", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0008NoFilterOperatorsInSetRange = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0008", (LocalizableString)new LocalizableResourceString("Rule0008NoFilterOperatorsInSetRangeTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0008NoFilterOperatorsInSetRangeFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0008NoFilterOperatorsInSetRangeDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0008", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0009CodeMetricsInfo = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0009", (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, false, (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0009", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0010CodeMetricsWarning = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0010", (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0010", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0011AccessPropertyShouldAlwaysBeSet = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0011", (LocalizableString)new LocalizableResourceString("Rule0011AccessPropertyShouldAlwaysBeSetTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0011AccessPropertyShouldAlwaysBeSetFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Hidden, false, (LocalizableString)new LocalizableResourceString("Rule0011AccessPropertyShouldAlwaysBeSetDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0011", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0012DoNotUseObjectIdInSystemFunctions = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0012", (LocalizableString)new LocalizableResourceString("Rule0012DoNotUseObjectIdInSystemFunctionsTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0012DoNotUseObjectIdInSystemFunctionsFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0012DoNotUseObjectIdInSystemFunctionsDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0012", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0013CheckForNotBlankOnSingleFieldPrimaryKeys = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0013", (LocalizableString)new LocalizableResourceString("Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0013", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0014PermissionSetCaptionLength = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0014", (LocalizableString)new LocalizableResourceString("Rule0014PermissionSetCaptionLengthTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0014PermissionSetCaptionLengthFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0014PermissionSetCaptionLengthDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0014", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0015PermissionSetCoverage = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0015", (LocalizableString)new LocalizableResourceString("Rule0015PermissionSetCoverageTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0015PermissionSetCoverageFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0015PermissionSetCoverageDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0015", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0016CheckForMissingCaptions = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0016", (LocalizableString)new LocalizableResourceString("Rule0016CheckForMissingCaptionsTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0016CheckForMissingCaptionsFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0016CheckForMissingCaptionsDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0016", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0017WriteToFlowField = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0017", (LocalizableString)new LocalizableResourceString("Rule0017WriteToFlowFieldTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0017WriteToFlowFieldFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0017WriteToFlowFieldDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0017", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0018NoEventsInInternalCodeunitsAnalyzerDescriptor = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0018", (LocalizableString)new LocalizableResourceString("Rule0018NoEventsInInternalCodeunitsTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0018NoEventsInInternalCodeunitsFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0018NoEventsInInternalCodeunitsDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0018", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0019DataClassificationFieldEqualsTable = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0019", (LocalizableString)new LocalizableResourceString("Rule0019DataClassificationFieldEqualsTableTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0019DataClassificationFieldEqualsTableFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0019DataClassificationFieldEqualsTableDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0019", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0020ApplicationAreaEqualsToPage = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0020", (LocalizableString)new LocalizableResourceString("Rule0020ApplicationAreaEqualsToPageTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0020ApplicationAreaEqualsToPageFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0020ApplicationAreaEqualsToPageDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0020", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0021ConfirmImplementConfirmManagement = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0021", (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0021", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0022GlobalLanguageImplementTranslationHelper = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0022", (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0022", Array.Empty<string>()); - public static readonly DiagnosticDescriptor Rule0023AlwaysSpecifyFieldgroups = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0023", (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0023", Array.Empty<string>()); + public static readonly DiagnosticDescriptor Rule0001FlowFieldsShouldNotBeEditable = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0001", (LocalizableString)new LocalizableResourceString("Rule0001FlowFieldsShouldNotBeEditable", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0001FlowFieldsShouldNotBeEditableFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0001FlowFieldsShouldNotBeEditableDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0001"); + public static readonly DiagnosticDescriptor Rule0002CommitMustBeExplainedByComment = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0002", (LocalizableString)new LocalizableResourceString("Rule0002CommitMustBeExplainedByComment", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0002CommitMustBeExplainedByCommentFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0002CommitMustBeExplainedByCommentDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0002"); + public static readonly DiagnosticDescriptor Rule0003DoNotUseObjectIDsInVariablesOrProperties = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0003", (LocalizableString)new LocalizableResourceString("Rule0003DoNotUseObjectIDsInVariablesOrProperties", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0003"); + public static readonly DiagnosticDescriptor Rule0004LookupPageIdAndDrillDownPageId = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0004", (LocalizableString)new LocalizableResourceString("Rule0004LookupPageIdAndDrillDownPageIdTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0004LookupPageIdAndDrillDownPageIdFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0004LookupPageIdAndDrillDownPageIdDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0004"); + public static readonly DiagnosticDescriptor Rule0005VariableCasingShouldNotDIfferFromDeclaration = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0005", (LocalizableString)new LocalizableResourceString("Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0005"); + public static readonly DiagnosticDescriptor Rule0006FieldNotAutoIncrementInTemporaryTable = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0006", (LocalizableString)new LocalizableResourceString("Rule0006FieldNotAutoIncrementInTemporaryTableTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0006FieldNotAutoIncrementInTemporaryTableFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Error, true, (LocalizableString)new LocalizableResourceString("Rule0006FieldNotAutoIncrementInTemporaryTableDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0006"); + public static readonly DiagnosticDescriptor Rule0007DataPerCompanyShouldAlwaysBeSet = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0007", (LocalizableString)new LocalizableResourceString("Rule0007DataPerCompanyShouldAlwaysBeSetTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0007DataPerCompanyShouldAlwaysBeSetFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Hidden, false, (LocalizableString)new LocalizableResourceString("Rule0007DataPerCompanyShouldAlwaysBeSetDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0007"); + public static readonly DiagnosticDescriptor Rule0008NoFilterOperatorsInSetRange = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0008", (LocalizableString)new LocalizableResourceString("Rule0008NoFilterOperatorsInSetRangeTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0008NoFilterOperatorsInSetRangeFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0008NoFilterOperatorsInSetRangeDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0008"); + public static readonly DiagnosticDescriptor Rule0009CodeMetricsInfo = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0009", (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, false, (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0009"); + public static readonly DiagnosticDescriptor Rule0010CodeMetricsWarning = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0010", (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0009CodeMetricsInfoDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0010"); + public static readonly DiagnosticDescriptor Rule0011AccessPropertyShouldAlwaysBeSet = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0011", (LocalizableString)new LocalizableResourceString("Rule0011AccessPropertyShouldAlwaysBeSetTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0011AccessPropertyShouldAlwaysBeSetFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Hidden, false, (LocalizableString)new LocalizableResourceString("Rule0011AccessPropertyShouldAlwaysBeSetDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0011"); + public static readonly DiagnosticDescriptor Rule0012DoNotUseObjectIdInSystemFunctions = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0012", (LocalizableString)new LocalizableResourceString("Rule0012DoNotUseObjectIdInSystemFunctionsTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0012DoNotUseObjectIdInSystemFunctionsFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0012DoNotUseObjectIdInSystemFunctionsDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0012"); + public static readonly DiagnosticDescriptor Rule0013CheckForNotBlankOnSingleFieldPrimaryKeys = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0013", (LocalizableString)new LocalizableResourceString("Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0013"); + public static readonly DiagnosticDescriptor Rule0014PermissionSetCaptionLength = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0014", (LocalizableString)new LocalizableResourceString("Rule0014PermissionSetCaptionLengthTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0014PermissionSetCaptionLengthFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0014PermissionSetCaptionLengthDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0014"); + public static readonly DiagnosticDescriptor Rule0015PermissionSetCoverage = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0015", (LocalizableString)new LocalizableResourceString("Rule0015PermissionSetCoverageTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0015PermissionSetCoverageFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0015PermissionSetCoverageDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0015"); + public static readonly DiagnosticDescriptor Rule0016CheckForMissingCaptions = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0016", (LocalizableString)new LocalizableResourceString("Rule0016CheckForMissingCaptionsTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0016CheckForMissingCaptionsFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0016CheckForMissingCaptionsDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0016"); + public static readonly DiagnosticDescriptor Rule0017WriteToFlowField = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0017", (LocalizableString)new LocalizableResourceString("Rule0017WriteToFlowFieldTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0017WriteToFlowFieldFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Warning, true, (LocalizableString)new LocalizableResourceString("Rule0017WriteToFlowFieldDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0017"); + public static readonly DiagnosticDescriptor Rule0018NoEventsInInternalCodeunitsAnalyzerDescriptor = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0018", (LocalizableString)new LocalizableResourceString("Rule0018NoEventsInInternalCodeunitsTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0018NoEventsInInternalCodeunitsFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0018NoEventsInInternalCodeunitsDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0018"); + public static readonly DiagnosticDescriptor Rule0019DataClassificationFieldEqualsTable = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0019", (LocalizableString)new LocalizableResourceString("Rule0019DataClassificationFieldEqualsTableTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0019DataClassificationFieldEqualsTableFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0019DataClassificationFieldEqualsTableDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0019"); + public static readonly DiagnosticDescriptor Rule0020ApplicationAreaEqualsToPage = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0020", (LocalizableString)new LocalizableResourceString("Rule0020ApplicationAreaEqualsToPageTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0020ApplicationAreaEqualsToPageFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0020ApplicationAreaEqualsToPageDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0020"); + public static readonly DiagnosticDescriptor Rule0021ConfirmImplementConfirmManagement = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0021", (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0021"); + public static readonly DiagnosticDescriptor Rule0022GlobalLanguageImplementTranslationHelper = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0022", (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0022"); + public static readonly DiagnosticDescriptor Rule0023AlwaysSpecifyFieldgroups = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0023", (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0023"); } } From dd5a74f5ef88d5efda1f71fae80437e69bff88cb Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Fri, 8 Sep 2023 14:44:13 +0200 Subject: [PATCH 08/15] Fix pipeline --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 70b9ffd9..1a5cf899 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -85,7 +85,7 @@ jobs: uses: actions/upload-artifact@v2.2.4 with: name: BusinessCentral.LinterCop.current.dll - path: bin\Debug\BusinessCentral.LinterCop.dll + path: bin/Debug/netstandard2.0/BusinessCentral.LinterCop.dll - name: Remove a Release Asset current uses: flcdrg/remove-release-asset-action@v1.0.13 env: From a9d1679ba469e529303db980e9bb109743c9eb21 Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Fri, 8 Sep 2023 15:01:41 +0200 Subject: [PATCH 09/15] Remove vsix cache logic --- .github/workflows/build.yml | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1a5cf899..1e1877a8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,24 +43,10 @@ jobs: echo "AL_VERSION_NEXT=$ALVersion_Next" >> $env:GITHUB_OUTPUT; echo "VSIX_URL_NEXT=$vsixUrl_Next" >> $env:GITHUB_OUTPUT; - - name: Cache VSIX Current - id: cache-vsix-current - uses: actions/cache@v2 - with: - path: ALLanguage_current.vsix - key: vsix-${{ steps.get-vsix.outputs.AL_VERSION_CURRENT }} - - name: Cache VSIX Next - id: cache-vsix-next - uses: actions/cache@v2 - with: - path: ALLanguage_next.vsix - key: vsix-${{ steps.get-vsix.outputs.AL_VERSION_NEXT }} - name: Download platform artifact Current - if: steps.cache-vsix-current.outputs.cache-hit != 'true' run: Invoke-WebRequest ${{ steps.get-vsix.outputs.VSIX_URL_CURRENT }} -OutFile ALLanguage_current.vsix - name: Download platform artifact Next - if: steps.cache-vsix-next.outputs.cache-hit != 'true' run: Invoke-WebRequest ${{ steps.get-vsix.outputs.VSIX_URL_NEXT }} -OutFile ALLanguage_next.vsix - name: Unzip vsix current @@ -104,7 +90,7 @@ jobs: asset_name: BusinessCentral.LinterCop.current.dll asset_content_type: application/octet-stream - - name: Unzip vsix + - name: Unzip vsix next run: > Remove-Item -Path "ms-dynamics-smb.al-latest" -Force -Recurse -ErrorAction SilentlyContinue; 7z x "ALLanguage_next.vsix" "-oms-dynamics-smb.al-latest" extension\bin\Analyzers -r; From be66f669d5b67a46b541091caac42bc7c33ec8bf Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Fri, 8 Sep 2023 15:10:26 +0200 Subject: [PATCH 10/15] cleawr build output before build vNext --- .github/workflows/build.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1e1877a8..5c85409d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -89,7 +89,8 @@ jobs: asset_path: bin/Debug/netstandard2.0/BusinessCentral.LinterCop.dll asset_name: BusinessCentral.LinterCop.current.dll asset_content_type: application/octet-stream - + - name: Clear Build output + run: Remove-Item -Path "bin/Debug" -Force -Recurse -ErrorAction SilentlyContinue; - name: Unzip vsix next run: > Remove-Item -Path "ms-dynamics-smb.al-latest" -Force -Recurse -ErrorAction SilentlyContinue; From 4f5ada6db5004face458aafc9a6b5e49c0e8e3c1 Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Fri, 8 Sep 2023 15:14:22 +0200 Subject: [PATCH 11/15] debug clear build oputput --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5c85409d..64623b0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -90,7 +90,7 @@ jobs: asset_name: BusinessCentral.LinterCop.current.dll asset_content_type: application/octet-stream - name: Clear Build output - run: Remove-Item -Path "bin/Debug" -Force -Recurse -ErrorAction SilentlyContinue; + run: Remove-Item -Path "bin/Debug" -Force -Recurse -Verbose; - name: Unzip vsix next run: > Remove-Item -Path "ms-dynamics-smb.al-latest" -Force -Recurse -ErrorAction SilentlyContinue; From f47674fa3ae9a986f501d894b321f269767de440 Mon Sep 17 00:00:00 2001 From: StefanMaron <stefanmaron@outlook.de> Date: Fri, 8 Sep 2023 15:21:43 +0200 Subject: [PATCH 12/15] more debugging --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 64623b0b..937070ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -93,7 +93,7 @@ jobs: run: Remove-Item -Path "bin/Debug" -Force -Recurse -Verbose; - name: Unzip vsix next run: > - Remove-Item -Path "ms-dynamics-smb.al-latest" -Force -Recurse -ErrorAction SilentlyContinue; + Remove-Item -Path "ms-dynamics-smb.al-latest" -Force -Recurse -Verbose; 7z x "ALLanguage_next.vsix" "-oms-dynamics-smb.al-latest" extension\bin\Analyzers -r; - name: Build next run: dotnet build --no-restore From 298390282d3045be89095963036cbacd9a100011 Mon Sep 17 00:00:00 2001 From: Christian Hovenbitzer <ch.hovenbitzer@web.de> Date: Mon, 9 Oct 2023 21:30:55 +0200 Subject: [PATCH 13/15] Added Inherent Permission check on Rule0015 --- Design/Rule0015PermissionSetCoverage.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Design/Rule0015PermissionSetCoverage.cs b/Design/Rule0015PermissionSetCoverage.cs index 50e122e5..1588d292 100644 --- a/Design/Rule0015PermissionSetCoverage.cs +++ b/Design/Rule0015PermissionSetCoverage.cs @@ -48,6 +48,8 @@ private void CheckPermissionSetCoverage(SymbolAnalysisContext context) continue; } + if(appObjTypeSymbol.Properties.Where(currentProperty => currentProperty.PropertyKind == PropertyKind.InherentPermissions).Any()) continue; + switch (appObjTypeSymbol.NavTypeKind) { case NavTypeKind.Codeunit: From a5225bdb2b6dad550c7c572581564acc16a07d71 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort <arthur.vandevondervoort@vanroey.be> Date: Thu, 26 Oct 2023 14:56:43 +0200 Subject: [PATCH 14/15] Added new rule 0028 --- ...e0028CodeNavigabilityOnEventSubscribers.cs | 33 + LinterCop.ruleset.json | 5 + LinterCopAnalyzers.Generated.cs | 3 +- LinterCopAnalyzers.resx | 777 +++++++++--------- README.md | 1 + 5 files changed, 437 insertions(+), 382 deletions(-) create mode 100644 Design/Rule0028CodeNavigabilityOnEventSubscribers.cs diff --git a/Design/Rule0028CodeNavigabilityOnEventSubscribers.cs b/Design/Rule0028CodeNavigabilityOnEventSubscribers.cs new file mode 100644 index 00000000..203594d1 --- /dev/null +++ b/Design/Rule0028CodeNavigabilityOnEventSubscribers.cs @@ -0,0 +1,33 @@ +using Microsoft.Dynamics.Nav.Analyzers.Common.AppSourceCopConfiguration; +using Microsoft.Dynamics.Nav.CodeAnalysis; +using Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics; +using Microsoft.Dynamics.Nav.CodeAnalysis.Syntax; +using System.Collections.Immutable; + +namespace BusinessCentral.LinterCop.Design +{ + [DiagnosticAnalyzer] + public class RuleXDescription : DiagnosticAnalyzer + { + public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics { get; } = ImmutableArray.Create<DiagnosticDescriptor>(DiagnosticDescriptors.Rule0028CodeNavigabilityOnEventSubscribers); + + public override void Initialize(AnalysisContext context) => context.RegisterCodeBlockAction(new Action<CodeBlockAnalysisContext>(this.CodeNavigabilityOnEventSubscribers)); + + private void CodeNavigabilityOnEventSubscribers(CodeBlockAnalysisContext context) + { + // Support for using Identifiers instead of Literals in event subscribers is supported from runtime versions: '11.0' or greater. + var manifest = AppSourceCopConfigurationProvider.GetManifest(context.SemanticModel.Compilation); + if (manifest.Runtime < RuntimeVersion.Spring2023) return; + + if (context.OwningSymbol.GetContainingObjectTypeSymbol().IsObsoletePending || context.OwningSymbol.GetContainingObjectTypeSymbol().IsObsoleteRemoved) return; + if (context.OwningSymbol.IsObsoletePending || context.OwningSymbol.IsObsoleteRemoved) return; + + var SyntaxList = ((MethodDeclarationSyntax)context.CodeBlock).Attributes.Where(value => value.GetIdentifierOrLiteralValue().ToUpper() == "EVENTSUBSCRIBER"); + foreach (var Syntax in SyntaxList) + { + if (Syntax.ArgumentList.Arguments[2].IsKind(SyntaxKind.LiteralAttributeArgument)) + context.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0028CodeNavigabilityOnEventSubscribers, context.OwningSymbol.GetLocation())); + } + } + } +} \ No newline at end of file diff --git a/LinterCop.ruleset.json b/LinterCop.ruleset.json index 68909c89..35cdd7f0 100644 --- a/LinterCop.ruleset.json +++ b/LinterCop.ruleset.json @@ -111,6 +111,11 @@ "id": "LC0022", "action": "Info", "justification": "GlobalLanguage() must be implemented through the Translation Helper codeunit from the Base Application." + }, + { + "id": "LC0028", + "action": "Info", + "justification": "Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier." } ] } \ No newline at end of file diff --git a/LinterCopAnalyzers.Generated.cs b/LinterCopAnalyzers.Generated.cs index 7ab7084c..5f944027 100644 --- a/LinterCopAnalyzers.Generated.cs +++ b/LinterCopAnalyzers.Generated.cs @@ -30,5 +30,6 @@ public static class DiagnosticDescriptors public static readonly DiagnosticDescriptor Rule0021ConfirmImplementConfirmManagement = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0021", (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0021ConfirmImplementConfirmManagement", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0021"); public static readonly DiagnosticDescriptor Rule0022GlobalLanguageImplementTranslationHelper = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0022", (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0022GlobalLanguageImplementTranslationHelperDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0022"); public static readonly DiagnosticDescriptor Rule0023AlwaysSpecifyFieldgroups = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0023", (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0023AlwaysSpecifyFieldgroups", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0023"); + public static readonly DiagnosticDescriptor Rule0028CodeNavigabilityOnEventSubscribers = new DiagnosticDescriptor(LinterCopAnalyzers.AnalyzerPrefix + "0028", (LocalizableString)new LocalizableResourceString("Rule0028CodeNavigabilityOnEventSubscribersTitle", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), (LocalizableString)new LocalizableResourceString("Rule0028CodeNavigabilityOnEventSubscribersFormat", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "Design", DiagnosticSeverity.Info, true, (LocalizableString)new LocalizableResourceString("Rule0028CodeNavigabilityOnEventSubscribersDescription", LinterCopAnalyzers.ResourceManager, typeof(LinterCopAnalyzers)), "https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0028"); } -} +} \ No newline at end of file diff --git a/LinterCopAnalyzers.resx b/LinterCopAnalyzers.resx index 0c77934f..6886a6d8 100644 --- a/LinterCopAnalyzers.resx +++ b/LinterCopAnalyzers.resx @@ -1,385 +1,400 @@ <?xml version="1.0" encoding="utf-8"?> <root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> - <xsd:element name="root" msdata:IsDataSet="true"> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0"/> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string"/> - <xsd:attribute name="type" type="xsd:string"/> - <xsd:attribute name="mimetype" type="xsd:string"/> - <xsd:attribute ref="xml:space"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string"/> - <xsd:attribute name="name" type="xsd:string"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/> - <xsd:attribute ref="xml:space"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required"/> - </xsd:complexType> - </xsd:element> - </xsd:choice> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string"/> + <xsd:attribute name="type" type="xsd:string"/> + <xsd:attribute name="mimetype" type="xsd:string"/> + <xsd:attribute ref="xml:space"/> </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="AnalyzerPrefix" xml:space="preserve"> - <value>LC</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableDescription" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableFormat" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableTitle" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentDescription" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentFormat" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentTitle" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration. Use {1} instead.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesTitle" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration.</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdDescription" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdFormat" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table "{1}" because it is used in page "{2}" (list)</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdTitle" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription" xml:space="preserve"> - <value>Wrong casing detected!</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat" xml:space="preserve"> - <value>Wrong casing detected! Use {0} instead.</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle" xml:space="preserve"> - <value>Wrong casing detected!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableDescription" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableFormat" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableTitle" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetDescription" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetFormat" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetTitle" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeDescription" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeFormat" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeTitle" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoDescription" xml:space="preserve"> - <value>Cyclomatic complexity and Maintainability index</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoFormat" xml:space="preserve"> - <value>Cyclomatic complexity: {0}/({1}), Maintainability index: {2}/({3})</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoTitle" xml:space="preserve"> - <value>Cyclomatic complexity and Maintainability index</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetDescription" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetFormat" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetTitle" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsDescription" xml:space="preserve"> - <value>Wrong Parameter detected.</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsFormat" xml:space="preserve"> - <value>Wrong Parameter detected. Select the correct object with "{0}::" instead.</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsTitle" xml:space="preserve"> - <value>Wrong Parameter detected.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthDescription" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed the maximum length.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthFormat" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed {0} characters. Use MaxLength={0} or Locked=true to ensure there are no translations that exceed this limit.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthTitle" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed the maximum length.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageDescription" xml:space="preserve"> - <value>All application objects should be covered by at least one permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageFormat" xml:space="preserve"> - <value>The application object {0} "{1}" is not covered by any permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageTitle" xml:space="preserve"> - <value>All application objects should be covered by at least one permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsDescription" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsFormat" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsTitle" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldFormat" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldDescription" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldTitle" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleTitle" xml:space="preserve"> - <value>There was an error in a Linter Rule</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleDecription" xml:space="preserve"> - <value>There was an error in a Linter Rule</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleFormat" xml:space="preserve"> - <value>There was an Error in Rule "{0}" of type "{1}" {2}</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsDescription" xml:space="preserve"> - <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsFormat" xml:space="preserve"> - <value>The event {0} is declared in an internal codeunit {1}. Avoid events in internal codeunits as they are not accessible to extensions.</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsTitle" xml:space="preserve"> - <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableTitle" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableDescription" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableFormat" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageTitle" xml:space="preserve"> - <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageFormat" xml:space="preserve"> - <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageDescription" xml:space="preserve"> - <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0021ConfirmImplementConfirmManagement" xml:space="preserve"> - <value>Confirm() must be implemented through the "Confirm Management" codeunit from the System Application.</value> - <comment/> - </data> - <data name="Rule0023AlwaysSpecifyFieldgroups" xml:space="preserve"> - <value>Fieldgroup "{0}" is missing on table "{1}".</value> - <comment/> - </data> - <data name="Fix0021ConfirmImplementConfirmManagementMessage" xml:space="preserve"> - <value>Refactor to Confirm Management</value> - <comment/> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperDescription" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperFormat" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperTitle" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> -</root> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string"/> + <xsd:attribute name="name" type="xsd:string"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/> + <xsd:attribute ref="xml:space"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required"/> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="AnalyzerPrefix" xml:space="preserve"> + <value>LC</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableDescription" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableFormat" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableTitle" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentDescription" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentFormat" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentTitle" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration. Use {1} instead.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesTitle" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration.</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdDescription" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdFormat" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table "{1}" because it is used in page "{2}" (list)</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdTitle" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription" xml:space="preserve"> + <value>Wrong casing detected!</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat" xml:space="preserve"> + <value>Wrong casing detected! Use {0} instead.</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle" xml:space="preserve"> + <value>Wrong casing detected!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableDescription" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableFormat" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableTitle" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetDescription" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetFormat" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetTitle" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeDescription" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeFormat" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeTitle" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoDescription" xml:space="preserve"> + <value>Cyclomatic complexity and Maintainability index</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoFormat" xml:space="preserve"> + <value>Cyclomatic complexity: {0}/({1}), Maintainability index: {2}/({3})</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoTitle" xml:space="preserve"> + <value>Cyclomatic complexity and Maintainability index</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetDescription" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetFormat" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetTitle" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsDescription" xml:space="preserve"> + <value>Wrong Parameter detected.</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsFormat" xml:space="preserve"> + <value>Wrong Parameter detected. Select the correct object with "{0}::" instead.</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsTitle" xml:space="preserve"> + <value>Wrong Parameter detected.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthDescription" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed the maximum length.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthFormat" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed {0} characters. Use MaxLength={0} or Locked=true to ensure there are no translations that exceed this limit.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthTitle" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed the maximum length.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageDescription" xml:space="preserve"> + <value>All application objects should be covered by at least one permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageFormat" xml:space="preserve"> + <value>The application object {0} "{1}" is not covered by any permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageTitle" xml:space="preserve"> + <value>All application objects should be covered by at least one permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsDescription" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsFormat" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsTitle" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldFormat" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldDescription" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldTitle" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleTitle" xml:space="preserve"> + <value>There was an error in a Linter Rule</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleDecription" xml:space="preserve"> + <value>There was an error in a Linter Rule</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleFormat" xml:space="preserve"> + <value>There was an Error in Rule "{0}" of type "{1}" {2}</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsDescription" xml:space="preserve"> + <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsFormat" xml:space="preserve"> + <value>The event {0} is declared in an internal codeunit {1}. Avoid events in internal codeunits as they are not accessible to extensions.</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsTitle" xml:space="preserve"> + <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableTitle" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableDescription" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableFormat" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageTitle" xml:space="preserve"> + <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageFormat" xml:space="preserve"> + <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageDescription" xml:space="preserve"> + <value>Application Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0021ConfirmImplementConfirmManagement" xml:space="preserve"> + <value>Confirm() must be implemented through the "Confirm Management" codeunit from the System Application.</value> + <comment/> + </data> + <data name="Rule0023AlwaysSpecifyFieldgroups" xml:space="preserve"> + <value>Fieldgroup "{0}" is missing on table "{1}".</value> + <comment/> + </data> + <data name="Fix0021ConfirmImplementConfirmManagementMessage" xml:space="preserve"> + <value>Refactor to Confirm Management</value> + <comment/> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperDescription" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + <comment/> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperFormat" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + <comment/> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperTitle" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + <comment/> + </data> + <data name="Rule0028CodeNavigabilityOnEventSubscribersTitle" xml:space="preserve"> + <value>Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.</value> + <comment/> + </data> + <data name="Rule0028CodeNavigabilityOnEventSubscribersFormat" xml:space="preserve"> + <value>Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.</value> + <comment/> + </data> + <data name="Rule0028CodeNavigabilityOnEventSubscribersDescription" xml:space="preserve"> + <value>Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.</value> + <comment/> + </data> +</root> \ No newline at end of file diff --git a/README.md b/README.md index 7ddff397..fc18e244 100644 --- a/README.md +++ b/README.md @@ -65,6 +65,7 @@ Further note that you should have BcContainerHelper version 2.0.16 (or newer) in |[LC0021](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0021)|`Confirm()` must be implemented through the `Confirm Management` codeunit from the System Application.|Info| |[LC0022](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0022)|`GlobalLanguage()` must be implemented through the `Translation Helper` codeunit from the Base Application.|Info| |[LC0023](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0023)|Always provide fieldsgroups `DropDown` and `Brick` on tables.|Info| +|[LC0028](https://github.com/StefanMaron/BusinessCentral.LinterCop/wiki/LC0028)|Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.|Info| ## Configuration From 234ccc0f4190e5c58eaab723ce09cbe335d21dc0 Mon Sep 17 00:00:00 2001 From: Arthur van de Vondervoort <arthur.vandevondervoort@vanroey.be> Date: Thu, 26 Oct 2023 15:57:02 +0200 Subject: [PATCH 15/15] Update ResX Schema --- LinterCopAnalyzers.resx | 777 ++++++++++++++++++++-------------------- 1 file changed, 396 insertions(+), 381 deletions(-) diff --git a/LinterCopAnalyzers.resx b/LinterCopAnalyzers.resx index effa7cc1..fa6e8a00 100644 --- a/LinterCopAnalyzers.resx +++ b/LinterCopAnalyzers.resx @@ -1,385 +1,400 @@ <?xml version="1.0" encoding="utf-8"?> <root> - <!-- - Microsoft ResX Schema - - Version 2.0 - - The primary goals of this format is to allow a simple XML format - that is mostly human readable. The generation and parsing of the - various data types are done through the TypeConverter classes - associated with the data types. - - Example: - - ... ado.net/XML headers & schema ... - <resheader name="resmimetype">text/microsoft-resx</resheader> - <resheader name="version">2.0</resheader> - <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> - <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> - <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> - <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> - <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> - <value>[base64 mime encoded serialized .NET Framework object]</value> - </data> - <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> - <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> - <comment>This is a comment</comment> - </data> - - There are any number of "resheader" rows that contain simple - name/value pairs. - - Each data row contains a name, and value. The row also contains a - type or mimetype. Type corresponds to a .NET class that support - text/value conversion through the TypeConverter architecture. - Classes that don't support this are serialized and stored with the - mimetype set. - - The mimetype is used for serialized objects, and tells the - ResXResourceReader how to depersist the object. This is currently not - extensible. For a given mimetype the value must be set accordingly: - - Note - application/x-microsoft.net.object.binary.base64 is the format - that the ResXResourceWriter will generate, however the reader can - read any of the formats listed below. - - mimetype: application/x-microsoft.net.object.binary.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.soap.base64 - value : The object must be serialized with - : System.Runtime.Serialization.Formatters.Soap.SoapFormatter - : and then encoded with base64 encoding. - - mimetype: application/x-microsoft.net.object.bytearray.base64 - value : The object must be serialized into a byte array - : using a System.ComponentModel.TypeConverter - : and then encoded with base64 encoding. - --> - <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> - <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> - <xsd:element name="root" msdata:IsDataSet="true"> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> <xsd:complexType> - <xsd:choice maxOccurs="unbounded"> - <xsd:element name="metadata"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0"/> - </xsd:sequence> - <xsd:attribute name="name" use="required" type="xsd:string"/> - <xsd:attribute name="type" type="xsd:string"/> - <xsd:attribute name="mimetype" type="xsd:string"/> - <xsd:attribute ref="xml:space"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="assembly"> - <xsd:complexType> - <xsd:attribute name="alias" type="xsd:string"/> - <xsd:attribute name="name" type="xsd:string"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="data"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> - <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/> - <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/> - <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/> - <xsd:attribute ref="xml:space"/> - </xsd:complexType> - </xsd:element> - <xsd:element name="resheader"> - <xsd:complexType> - <xsd:sequence> - <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> - </xsd:sequence> - <xsd:attribute name="name" type="xsd:string" use="required"/> - </xsd:complexType> - </xsd:element> - </xsd:choice> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0"/> + </xsd:sequence> + <xsd:attribute name="name" use="required" type="xsd:string"/> + <xsd:attribute name="type" type="xsd:string"/> + <xsd:attribute name="mimetype" type="xsd:string"/> + <xsd:attribute ref="xml:space"/> </xsd:complexType> - </xsd:element> - </xsd:schema> - <resheader name="resmimetype"> - <value>text/microsoft-resx</value> - </resheader> - <resheader name="version"> - <value>2.0</value> - </resheader> - <resheader name="reader"> - <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <resheader name="writer"> - <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> - </resheader> - <data name="AnalyzerPrefix" xml:space="preserve"> - <value>LC</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableDescription" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableFormat" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0001FlowFieldsShouldNotBeEditableTitle" xml:space="preserve"> - <value>FlowFields should not be editable.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentDescription" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentFormat" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0002CommitMustBeExplainedByCommentTitle" xml:space="preserve"> - <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration. Use {1} instead.</value> - <comment/> - </data> - <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesTitle" xml:space="preserve"> - <value>Do not use an Object ID for properties or variables declaration.</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdDescription" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdFormat" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table "{1}" because it is used in page "{2}" (list)</value> - <comment/> - </data> - <data name="Rule0004LookupPageIdAndDrillDownPageIdTitle" xml:space="preserve"> - <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription" xml:space="preserve"> - <value>Wrong casing detected!</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat" xml:space="preserve"> - <value>Wrong casing detected! Use {0} instead.</value> - <comment/> - </data> - <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle" xml:space="preserve"> - <value>Wrong casing detected!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableDescription" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableFormat" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0006FieldNotAutoIncrementInTemporaryTableTitle" xml:space="preserve"> - <value>AutoIncrement fields are not possible in temporary tables!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetDescription" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetFormat" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0007DataPerCompanyShouldAlwaysBeSetTitle" xml:space="preserve"> - <value>DataPerCompany is missing!</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeDescription" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeFormat" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0008NoFilterOperatorsInSetRangeTitle" xml:space="preserve"> - <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoDescription" xml:space="preserve"> - <value>Cyclomatic complexity and Maintainability index</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoFormat" xml:space="preserve"> - <value>Cyclomatic complexity: {0}/({1}), Maintainability index: {2}/({3})</value> - <comment/> - </data> - <data name="Rule0009CodeMetricsInfoTitle" xml:space="preserve"> - <value>Cyclomatic complexity and Maintainability index</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetDescription" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetFormat" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0011AccessPropertyShouldAlwaysBeSetTitle" xml:space="preserve"> - <value>Access property is missing!</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsDescription" xml:space="preserve"> - <value>Wrong Parameter detected.</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsFormat" xml:space="preserve"> - <value>Wrong Parameter detected. Select the correct object with "{0}::" instead.</value> - <comment/> - </data> - <data name="Rule0012DoNotUseObjectIdInSystemFunctionsTitle" xml:space="preserve"> - <value>Wrong Parameter detected.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat" xml:space="preserve"> - <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthDescription" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed the maximum length.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthFormat" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed {0} characters. Use MaxLength={0} or Locked=true to ensure there are no translations that exceed this limit.</value> - <comment/> - </data> - <data name="Rule0014PermissionSetCaptionLengthTitle" xml:space="preserve"> - <value>The Caption of permissionset objects should not exceed the maximum length.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageDescription" xml:space="preserve"> - <value>All application objects should be covered by at least one permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageFormat" xml:space="preserve"> - <value>The application object {0} "{1}" is not covered by any permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0015PermissionSetCoverageTitle" xml:space="preserve"> - <value>All application objects should be covered by at least one permission set in the extension.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsDescription" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsFormat" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0016CheckForMissingCaptionsTitle" xml:space="preserve"> - <value>Caption is missing.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldFormat" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldDescription" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0017WriteToFlowFieldTitle" xml:space="preserve"> - <value>Writing to a FlowField is not common. Add a comment to explain this.</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleTitle" xml:space="preserve"> - <value>There was an error in a Linter Rule</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleDecription" xml:space="preserve"> - <value>There was an error in a Linter Rule</value> - <comment/> - </data> - <data name="Rule0000ErrorInRuleFormat" xml:space="preserve"> - <value>There was an Error in Rule "{0}" of type "{1}" {2}</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsDescription" xml:space="preserve"> - <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsFormat" xml:space="preserve"> - <value>The event {0} is declared in an internal codeunit {1}. Avoid events in internal codeunits as they are not accessible to extensions.</value> - <comment/> - </data> - <data name="Rule0018NoEventsInInternalCodeunitsTitle" xml:space="preserve"> - <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableTitle" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableDescription" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0019DataClassificationFieldEqualsTableFormat" xml:space="preserve"> - <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageTitle" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageFormat" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0020ApplicationAreaEqualsToPageDescription" xml:space="preserve"> - <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> - <comment/> - </data> - <data name="Rule0021ConfirmImplementConfirmManagement" xml:space="preserve"> - <value>Confirm() must be implemented through the "Confirm Management" codeunit from the System Application.</value> - <comment/> - </data> - <data name="Rule0023AlwaysSpecifyFieldgroups" xml:space="preserve"> - <value>Fieldgroup "{0}" is missing on table "{1}".</value> - <comment/> - </data> - <data name="Fix0021ConfirmImplementConfirmManagementMessage" xml:space="preserve"> - <value>Refactor to Confirm Management</value> - <comment/> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperDescription" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperFormat" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> - <data name="Rule0022GlobalLanguageImplementTranslationHelperTitle" xml:space="preserve"> - <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> - </data> -</root> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string"/> + <xsd:attribute name="name" type="xsd:string"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1"/> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3"/> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4"/> + <xsd:attribute ref="xml:space"/> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1"/> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required"/> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <data name="AnalyzerPrefix" xml:space="preserve"> + <value>LC</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableDescription" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableFormat" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0001FlowFieldsShouldNotBeEditableTitle" xml:space="preserve"> + <value>FlowFields should not be editable.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentDescription" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentFormat" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0002CommitMustBeExplainedByCommentTitle" xml:space="preserve"> + <value>Commit() needs a comment to justify its existence. Either a leading or a trailing comment.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesDescription" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesFormat" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration. Use {1} instead.</value> + <comment/> + </data> + <data name="Rule0003DoNotUseObjectIDsInVariablesOrPropertiesTitle" xml:space="preserve"> + <value>Do not use an Object ID for properties or variables declaration.</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdDescription" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdFormat" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table "{1}" because it is used in page "{2}" (list)</value> + <comment/> + </data> + <data name="Rule0004LookupPageIdAndDrillDownPageIdTitle" xml:space="preserve"> + <value>Property "LookupPageID" and "DrilldownPageID" must be filled in table because it is used in list page</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationDescription" xml:space="preserve"> + <value>Wrong casing detected!</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationFormat" xml:space="preserve"> + <value>Wrong casing detected! Use {0} instead.</value> + <comment/> + </data> + <data name="Rule0005VariableCasingShouldNotDIfferFromDeclarationTitle" xml:space="preserve"> + <value>Wrong casing detected!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableDescription" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableFormat" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0006FieldNotAutoIncrementInTemporaryTableTitle" xml:space="preserve"> + <value>AutoIncrement fields are not possible in temporary tables!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetDescription" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetFormat" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0007DataPerCompanyShouldAlwaysBeSetTitle" xml:space="preserve"> + <value>DataPerCompany is missing!</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeDescription" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeFormat" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0008NoFilterOperatorsInSetRangeTitle" xml:space="preserve"> + <value>Filter operators should not be used in SetRange. Use SetFilter instead.</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoDescription" xml:space="preserve"> + <value>Cyclomatic complexity and Maintainability index</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoFormat" xml:space="preserve"> + <value>Cyclomatic complexity: {0}/({1}), Maintainability index: {2}/({3})</value> + <comment/> + </data> + <data name="Rule0009CodeMetricsInfoTitle" xml:space="preserve"> + <value>Cyclomatic complexity and Maintainability index</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetDescription" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetFormat" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0011AccessPropertyShouldAlwaysBeSetTitle" xml:space="preserve"> + <value>Access property is missing!</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsDescription" xml:space="preserve"> + <value>Wrong Parameter detected.</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsFormat" xml:space="preserve"> + <value>Wrong Parameter detected. Select the correct object with "{0}::" instead.</value> + <comment/> + </data> + <data name="Rule0012DoNotUseObjectIdInSystemFunctionsTitle" xml:space="preserve"> + <value>Wrong Parameter detected.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysDescription" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysTitle" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0013CheckForNotBlankOnSingleFieldPrimaryKeysFormat" xml:space="preserve"> + <value>NotBlank should be set explicitly for tables with a single-field primary key.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthDescription" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed the maximum length.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthFormat" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed {0} characters. Use MaxLength={0} or Locked=true to ensure there are no translations that exceed this limit.</value> + <comment/> + </data> + <data name="Rule0014PermissionSetCaptionLengthTitle" xml:space="preserve"> + <value>The Caption of permissionset objects should not exceed the maximum length.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageDescription" xml:space="preserve"> + <value>All application objects should be covered by at least one permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageFormat" xml:space="preserve"> + <value>The application object {0} "{1}" is not covered by any permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0015PermissionSetCoverageTitle" xml:space="preserve"> + <value>All application objects should be covered by at least one permission set in the extension.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsDescription" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsFormat" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0016CheckForMissingCaptionsTitle" xml:space="preserve"> + <value>Caption is missing.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldFormat" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldDescription" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0017WriteToFlowFieldTitle" xml:space="preserve"> + <value>Writing to a FlowField is not common. Add a comment to explain this.</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleTitle" xml:space="preserve"> + <value>There was an error in a Linter Rule</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleDecription" xml:space="preserve"> + <value>There was an error in a Linter Rule</value> + <comment/> + </data> + <data name="Rule0000ErrorInRuleFormat" xml:space="preserve"> + <value>There was an Error in Rule "{0}" of type "{1}" {2}</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsDescription" xml:space="preserve"> + <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsFormat" xml:space="preserve"> + <value>The event {0} is declared in an internal codeunit {1}. Avoid events in internal codeunits as they are not accessible to extensions.</value> + <comment/> + </data> + <data name="Rule0018NoEventsInInternalCodeunitsTitle" xml:space="preserve"> + <value>Events in internal codeunits are not accessible to extensions and should therefore be avoided.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableTitle" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableDescription" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0019DataClassificationFieldEqualsTableFormat" xml:space="preserve"> + <value>Data Classification is equal to the Table. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageTitle" xml:space="preserve"> + <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageFormat" xml:space="preserve"> + <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0020ApplicationAreaEqualsToPageDescription" xml:space="preserve"> + <value>Applicatication Area is equal to the Page. Remove to reduce redundancy.</value> + <comment/> + </data> + <data name="Rule0021ConfirmImplementConfirmManagement" xml:space="preserve"> + <value>Confirm() must be implemented through the "Confirm Management" codeunit from the System Application.</value> + <comment/> + </data> + <data name="Rule0023AlwaysSpecifyFieldgroups" xml:space="preserve"> + <value>Fieldgroup "{0}" is missing on table "{1}".</value> + <comment/> + </data> + <data name="Fix0021ConfirmImplementConfirmManagementMessage" xml:space="preserve"> + <value>Refactor to Confirm Management</value> + <comment/> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperDescription" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + <comment/> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperFormat" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + <comment/> + </data> + <data name="Rule0022GlobalLanguageImplementTranslationHelperTitle" xml:space="preserve"> + <value>GlobalLanguage() must be implemented through the "Translation Helper" codeunit from the Base Application.</value> + <comment/> + </data> + <data name="Rule0028CodeNavigabilityOnEventSubscribersTitle" xml:space="preserve"> + <value>Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.</value> + <comment/> + </data> + <data name="Rule0028CodeNavigabilityOnEventSubscribersFormat" xml:space="preserve"> + <value>Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.</value> + <comment/> + </data> + <data name="Rule0028CodeNavigabilityOnEventSubscribersDescription" xml:space="preserve"> + <value>Event subscriber arguments now use identifier syntax instead of string literals. Convert the argument literal to an identifier.</value> + <comment/> + </data> +</root> \ No newline at end of file