Skip to content

Commit

Permalink
Merge pull request #605 from StefanMaron/SecretText
Browse files Browse the repository at this point in the history
Enable LC0043 on AL version 13
  • Loading branch information
Arthurvdv authored May 5, 2024
2 parents de21afd + fed6b52 commit c2a7100
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
49 changes: 25 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,30 +53,31 @@ jobs:
$featureFlags = ""
$RuntimeVersion = [Ordered]@{
'Spring2018' = '1.0'
'Fall2018' = '2.0'
'Spring2019' = '3.0'
'Fall2019' = '4.0'
'Spring2020' = '5.0'
'Fall2020' = '6.0'
'Spring2021' = '7.0'
'Fall2021' = '8.0'
'Spring2022' = '9.0'
'Spring2022RV1' = '9.1'
'Spring2022RV2' = '9.2'
'Fall2022' = '10.0'
'Spring2023' = '11.0'
'Fall2023' = '12.0'
'Fall2023RV1' = '12.1'
'Fall2023RV2' = '12.2'
'Fall2023RV3' = '12.3'
'Spring2024' = '13.0'
'Fall2024' = '14.0'
'Spring2025' = '15.0'
'Fall2025' = '16.0'
'ManifestHelper' = '13.0.937154'
'PageSystemAction' = '13.0.878831'
'Spring2018' = '1.0'
'Fall2018' = '2.0'
'Spring2019' = '3.0'
'Fall2019' = '4.0'
'Spring2020' = '5.0'
'Fall2020' = '6.0'
'Spring2021' = '7.0'
'Fall2021' = '8.0'
'Spring2022' = '9.0'
'Spring2022RV1' = '9.1'
'Spring2022RV2' = '9.2'
'Fall2022' = '10.0'
'Spring2023' = '11.0'
'Fall2023' = '12.0'
'Fall2023RV1' = '12.1'
'Fall2023RV2' = '12.2'
'Fall2023RV3' = '12.3'
'Spring2024' = '13.0'
'Fall2024' = '14.0'
'Spring2025' = '15.0'
'Fall2025' = '16.0'
'Spring2024OrGreater' = '13.0.964488'
'ManifestHelper' = '13.0.937154'
'PageSystemAction' = '13.0.878831'
}
$supportedRuntimeVersions = $RuntimeVersion.GetEnumerator() | Where-Object { $(ConvertTo-Version($_.Value)) -le $(ConvertTo-Version($version)) } | Foreach-Object { $_.Key } | ForEach-Object { "#$_" }
Expand Down
4 changes: 3 additions & 1 deletion Design/Rule0043SecretText.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if Fall2024
#if Fall2023RV1
using System.Collections.Immutable;
using BusinessCentral.LinterCop.AnalysisContextExtension;
using Microsoft.Dynamics.Nav.CodeAnalysis;
Expand Down Expand Up @@ -29,6 +29,7 @@ public override void Initialize(AnalysisContext context)

private void AnalyzeIsolatedStorage(OperationAnalysisContext ctx)
{
#if Spring2024OrGreater
if (!VersionChecker.IsSupported(ctx.ContainingSymbol, VersionCompatibility.Spring2024OrGreater)) return;

if (ctx.IsObsoletePendingOrRemoved()) return;
Expand Down Expand Up @@ -59,6 +60,7 @@ private void AnalyzeIsolatedStorage(OperationAnalysisContext ctx)

if (!IsArgumentOfTypeSecretText(operation.Arguments[argumentIndex]))
ctx.ReportDiagnostic(Diagnostic.Create(DiagnosticDescriptors.Rule0043SecretText, ctx.Operation.Syntax.GetLocation()));
#endif
}

private void AnalyzeHttpObjects(OperationAnalysisContext ctx)
Expand Down

0 comments on commit c2a7100

Please sign in to comment.