diff --git a/Razor.sln b/Razor.sln index ed7243ac96..2bfe403678 100644 --- a/Razor.sln +++ b/Razor.sln @@ -5,6 +5,7 @@ VisualStudioVersion = 17.0.31415.485 MinimumVisualStudioVersion = 16.0.0.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tooling", "Tooling", "{3C0D6505-79B3-49D0-B4C3-176F0F1836ED}" ProjectSection(SolutionItems) = preProject + src\Razor\src\.editorconfig = src\Razor\src\.editorconfig src\Razor\src\Directory.Build.props = src\Razor\src\Directory.Build.props EndProjectSection EndProject diff --git a/eng/Versions.props b/eng/Versions.props index f05d8b94a0..2e85698cec 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -152,6 +152,7 @@ $(RoslynPackageVersion) $(RoslynPackageVersion) $(Tooling_MicrosoftCodeAnalysisAnalyzersPackageVersion) + $(Tooling_MicrosoftCodeAnalysisAnalyzersPackageVersion) $(Tooling_MicrosoftCodeAnalysisAnalyzersPackageVersion) $(RoslynPackageVersion) 0.10.0 diff --git a/src/Razor/Directory.Build.props b/src/Razor/Directory.Build.props index c9758e33ea..92a021d826 100644 --- a/src/Razor/Directory.Build.props +++ b/src/Razor/Directory.Build.props @@ -3,6 +3,11 @@ + + Latest + AllEnabledByDefault + + diff --git a/src/Razor/src/Directory.Build.props b/src/Razor/src/Directory.Build.props index 3519c7df24..1c23997eff 100644 --- a/src/Razor/src/Directory.Build.props +++ b/src/Razor/src/Directory.Build.props @@ -11,4 +11,10 @@ true + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs index 2a823d6791..a8c9c65136 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/Completion/CompletionListCache.cs @@ -68,5 +68,5 @@ internal sealed class CompletionListCache } } - public record CacheEntry(int ResultId, VSInternalCompletionList CompletionList, object? Context); + internal record CacheEntry(int ResultId, VSInternalCompletionList CompletionList, object? Context); } diff --git a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IRazorLogger.cs b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IRazorLogger.cs index 920c6b05e3..aff7234a64 100644 --- a/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IRazorLogger.cs +++ b/src/Razor/src/Microsoft.AspNetCore.Razor.LanguageServer/IRazorLogger.cs @@ -6,6 +6,6 @@ using Microsoft.Extensions.Logging; namespace Microsoft.AspNetCore.Razor.LanguageServer; -internal interface IRazorLogger : ILogger, ILspLogger +public interface IRazorLogger : ILogger, ILspLogger { } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DefaultRazorDynamicFileInfoProvider.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DefaultRazorDynamicFileInfoProvider.cs index 81b508199b..d0cc91de96 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DefaultRazorDynamicFileInfoProvider.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DefaultRazorDynamicFileInfoProvider.cs @@ -492,6 +492,6 @@ internal class DefaultRazorDynamicFileInfoProvider : RazorDynamicFileInfoProvide return new TestDynamicFileInfoResult(result.FilePath, result.TextLoader); } - public record TestDynamicFileInfoResult(string FilePath, TextLoader TextLoader); + internal record TestDynamicFileInfoResult(string FilePath, TextLoader TextLoader); } } diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentKey.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentKey.cs index bfdd8e6fff..50f2db0a35 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentKey.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/DocumentKey.cs @@ -8,7 +8,7 @@ using Microsoft.Extensions.Internal; namespace Microsoft.CodeAnalysis.Razor; -public readonly struct DocumentKey : IEquatable +internal readonly struct DocumentKey : IEquatable { public DocumentKey(string projectFilePath, string documentFilePath) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettings.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettings.cs index 0237476685..a4e48701ec 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettings.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettings.cs @@ -6,7 +6,7 @@ using Microsoft.Extensions.Internal; namespace Microsoft.CodeAnalysis.Razor.Editor; -public sealed class EditorSettings : IEquatable +internal sealed class EditorSettings : IEquatable { public static readonly EditorSettings Default = new(indentWithTabs: false, indentSize: 4); diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettingsChangedEventArgs.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettingsChangedEventArgs.cs index f9b83ae9cc..85d9bf3048 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettingsChangedEventArgs.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Editor/EditorSettingsChangedEventArgs.cs @@ -5,7 +5,7 @@ using System; namespace Microsoft.CodeAnalysis.Razor.Editor; -public sealed class EditorSettingsChangedEventArgs : EventArgs +internal sealed class EditorSettingsChangedEventArgs : EventArgs { public EditorSettingsChangedEventArgs(EditorSettings settings) { diff --git a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ElementCompletionContext.cs b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ElementCompletionContext.cs index 83161bf569..1ccc6f6fe6 100644 --- a/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ElementCompletionContext.cs +++ b/src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/ElementCompletionContext.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Razor.Language; namespace Microsoft.VisualStudio.Editor.Razor; -public sealed class ElementCompletionContext +internal sealed class ElementCompletionContext { public ElementCompletionContext( TagHelperDocumentContext documentContext, diff --git a/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/ClassifiedSpan.cs b/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/ClassifiedSpan.cs index f5baf72690..71d5814502 100644 --- a/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/ClassifiedSpan.cs +++ b/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/ClassifiedSpan.cs @@ -5,7 +5,7 @@ using Microsoft.AspNetCore.Razor.Language; namespace Microsoft.VisualStudio.Editor.Razor; -public struct ClassifiedSpan +internal struct ClassifiedSpan { public ClassifiedSpan(SourceSpan span, SourceSpan blockSpan, SpanKind spanKind, BlockKind blockKind, AcceptedCharacters acceptedCharacters) { diff --git a/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/TagHelperSpan.cs b/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/TagHelperSpan.cs index 48946bb5cb..5eae273e8c 100644 --- a/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/TagHelperSpan.cs +++ b/src/Razor/src/Microsoft.VisualStudio.Editor.Razor/TagHelperSpan.cs @@ -7,7 +7,7 @@ using Microsoft.AspNetCore.Razor.Language; namespace Microsoft.VisualStudio.Editor.Razor; -public struct TagHelperSpan +internal struct TagHelperSpan { public TagHelperSpan(SourceSpan span, TagHelperBinding binding) { diff --git a/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/MessageInterception/InterceptionResult.cs b/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/MessageInterception/InterceptionResult.cs index 30ad7aa206..5aa359372b 100644 --- a/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/MessageInterception/InterceptionResult.cs +++ b/src/Razor/src/Microsoft.VisualStudio.LanguageServer.ContainedLanguage/MessageInterception/InterceptionResult.cs @@ -8,7 +8,7 @@ namespace Microsoft.VisualStudio.LanguageServer.ContainedLanguage.MessageInterce /// /// Contains an updated message token and a signal of whether the document Uri was changed. /// -public struct InterceptionResult +internal struct InterceptionResult { public static readonly InterceptionResult NoChange = new(null, false); diff --git a/src/Shared/LanguageSupport/IsExternalInit.cs b/src/Shared/LanguageSupport/IsExternalInit.cs index 2c6cb64fa4..096f4a5c10 100644 --- a/src/Shared/LanguageSupport/IsExternalInit.cs +++ b/src/Shared/LanguageSupport/IsExternalInit.cs @@ -13,7 +13,7 @@ namespace System.Runtime.CompilerServices; /// This dummy class is required to compile records when targeting .NET Standard /// [EditorBrowsable(EditorBrowsableState.Never)] -public static class IsExternalInit +internal static class IsExternalInit { }