Skip to content

Commit

Permalink
Merge pull request #534 from StefanMaron/development
Browse files Browse the repository at this point in the history
Development
  • Loading branch information
Arthurvdv authored Feb 7, 2024
2 parents ea249c5 + f55b06a commit 1df052e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
6 changes: 4 additions & 2 deletions Design/Rule0033AppManifestRuntimeBehind.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Microsoft.Dynamics.Nav.Analyzers.Common.AppSourceCopConfiguration;
//using Microsoft.Dynamics.Nav.Analyzers.Common.AppSourceCopConfiguration; // AL Language v12
using Microsoft.Dynamics.Nav.Analyzers.Common; // AL Language v13
using Microsoft.Dynamics.Nav.CodeAnalysis;
using Microsoft.Dynamics.Nav.CodeAnalysis.Diagnostics;
using Microsoft.Dynamics.Nav.CodeAnalysis.Packaging;
Expand All @@ -15,7 +16,8 @@ class Rule0033AppManifestRuntimeBehind : DiagnosticAnalyzer

private void CheckAppManifestRuntime(CompilationAnalysisContext ctx)
{
NavAppManifest manifest = AppSourceCopConfigurationProvider.GetManifest(ctx.Compilation);
//NavAppManifest manifest = AppSourceCopConfigurationProvider.GetManifest(ctx.Compilation); // AL Language v12
NavAppManifest manifest = ManifestHelper.GetManifest(ctx.Compilation); // AL Language v13

Check failure on line 20 in Design/Rule0033AppManifestRuntimeBehind.cs

View workflow job for this annotation

GitHub Actions / build

'ManifestHelper' does not contain a definition for 'GetManifest'

Check failure on line 20 in Design/Rule0033AppManifestRuntimeBehind.cs

View workflow job for this annotation

GitHub Actions / build

'ManifestHelper' does not contain a definition for 'GetManifest'
if (manifest == null) return;
if (manifest.Runtime == null) return;
if (manifest.Application == null && manifest.Platform == null) return;
Expand Down
18 changes: 12 additions & 6 deletions Design/Rule0052and0053InternalProceduresNotReferenced.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,18 @@
using Microsoft.Dynamics.Nav.CodeAnalysis.Symbols;
using Microsoft.Dynamics.Nav.CodeAnalysis.Syntax;
using Microsoft.Dynamics.Nav.CodeAnalysis.Packaging;
using Microsoft.Dynamics.Nav.Analyzers.Common.AppSourceCopConfiguration;
//using Microsoft.Dynamics.Nav.Analyzers.Common.AppSourceCopConfiguration; // AL Language v12
using Microsoft.Dynamics.Nav.Analyzers.Common; // AL Language v13
using System.Collections.Immutable;

namespace BusinessCentral.LinterCop.Design {
namespace BusinessCentral.LinterCop.Design
{
[DiagnosticAnalyzer]
public class Rule0052InternalProceduresNotReferencedAnalyzer : DiagnosticAnalyzer {
public class Rule0052InternalProceduresNotReferencedAnalyzer : DiagnosticAnalyzer
{

private class MethodSymbolAnalyzer : IDisposable {
private class MethodSymbolAnalyzer : IDisposable
{
private readonly PooledDictionary<IMethodSymbol, string> methodSymbols = PooledDictionary<IMethodSymbol, string>.GetInstance();

private readonly PooledDictionary<IMethodSymbol, string> internalMethodsUnused = PooledDictionary<IMethodSymbol, string>.GetInstance();
Expand All @@ -23,8 +27,10 @@ private class MethodSymbolAnalyzer : IDisposable {

public MethodSymbolAnalyzer(CompilationAnalysisContext compilationAnalysisContext)
{
NavAppManifest manifest = AppSourceCopConfigurationProvider.GetManifest(compilationAnalysisContext.Compilation);
if(manifest.InternalsVisibleTo != null && manifest.InternalsVisibleTo.Any()) {
//NavAppManifest manifest = AppSourceCopConfigurationProvider.GetManifest(compilationAnalysisContext.Compilation); // AL Language v12
NavAppManifest manifest = ManifestHelper.GetManifest(compilationAnalysisContext.Compilation); // AL Language v13

Check failure on line 31 in Design/Rule0052and0053InternalProceduresNotReferenced.cs

View workflow job for this annotation

GitHub Actions / build

'ManifestHelper' does not contain a definition for 'GetManifest'

Check failure on line 31 in Design/Rule0052and0053InternalProceduresNotReferenced.cs

View workflow job for this annotation

GitHub Actions / build

'ManifestHelper' does not contain a definition for 'GetManifest'
if (manifest.InternalsVisibleTo != null && manifest.InternalsVisibleTo.Any())
{
return;
}

Expand Down

0 comments on commit 1df052e

Please sign in to comment.