Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Meziantou.Polyfill" Version="1.0.62">
<PackageReference Include="Meziantou.Polyfill" Version="1.0.154">
Comment thread
meziantou marked this conversation as resolved.
Outdated
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
Expand Down
8 changes: 4 additions & 4 deletions global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "10.0.300",
"version": "10.0.301",
"rollForward": "latestPatch"
},
"msbuild-sdks": {
"Meziantou.NET.Sdk": "1.0.103",
"Meziantou.NET.Sdk.Test": "1.0.103",
"Meziantou.NET.Sdk.Web": "1.0.103"
"Meziantou.NET.Sdk": "1.0.113",
"Meziantou.NET.Sdk.Test": "1.0.113",
"Meziantou.NET.Sdk.Web": "1.0.113"
}
}
2 changes: 1 addition & 1 deletion src/DocumentationGenerator/DocumentationGenerator.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Meziantou.Framework.FullPath" Version="1.1.18" />
<PackageReference Include="Meziantou.Framework.FullPath" Version="2.1.6" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.11.0" />
</ItemGroup>

Expand Down
14 changes: 7 additions & 7 deletions src/DocumentationGenerator/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,13 +170,13 @@ void AddLink(string name)
GenerateFile(outputFolder / "src" / "Meziantou.Analyzer.Pack" / "configuration" / "all-errors.editorconfig", sb => GenerateEditorConfig(sb, diagnosticAnalyzers, overrideSeverity: "error", appendCodeBlock: false));
void GenerateFile(FullPath outputPath, Action<StringBuilder> code)
{
var sb = new StringBuilder();
sb.Append("# This file is generated by the build process. Do not edit it manually.\n");
sb.Append("is_global = true\n");
sb.Append("global_level = -100\n");
sb.Append('\n');
code(sb);
WriteFileIfChanged(outputPath, sb.ToString());
var content = new StringBuilder();
content.Append("# This file is generated by the build process. Do not edit it manually.\n");
content.Append("is_global = true\n");
content.Append("global_level = -100\n");
content.Append('\n');
code(content);
WriteFileIfChanged(outputPath, content.ToString());
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/ListDotNetTypes/ListDotNetTypes.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NuGet.Protocol" Version="7.3.1" />
<PackageReference Include="NuGet.Protocol" Version="7.6.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private static async Task<Document> FixString(Document document, SyntaxNode node
if (nodeToFix is LiteralExpressionSyntax literal)
{
var text = literal.GetText().ToString();
var isVerbatim = text.StartsWith('@');
var isVerbatim = text.StartsWith("@", StringComparison.Ordinal);
Comment thread
meziantou marked this conversation as resolved.
Outdated
text = isVerbatim ? text[2..^1] : text[1..^1];

var newNode = ReplaceString(generator, text, newLine, newLineTrivia);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private static Dictionary<string, List<string>> LoadTypes(bool preview)
using var sr = new StreamReader(stream);
while (sr.ReadLine() is { } line)
{
var index = line.LastIndexOf('.');
var index = line.LastIndexOf(".", StringComparison.Ordinal);
Comment thread
meziantou marked this conversation as resolved.
Outdated
var ns = line[..index];
var name = line[(index + 1)..];

Expand Down
4 changes: 2 additions & 2 deletions src/Meziantou.Analyzer/Rules/LoggerParameterTypeAnalyzer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ LoggerConfigurationFile LoadConfiguration()
continue;

var lineText = line.ToString();
if (lineText.StartsWith('#'))
if (lineText.StartsWith("#", StringComparison.Ordinal))
Comment thread
meziantou marked this conversation as resolved.
Outdated
continue;

var parts = lineText.Split(';');
Expand Down Expand Up @@ -513,7 +513,7 @@ private static string RemovePrefix(string name, char[]? potentialNamePrefixes)
{
foreach (var prefix in potentialNamePrefixes)
{
if (name.StartsWith(prefix))
if (name.StartsWith(prefix.ToString(), StringComparison.Ordinal))
Comment thread
meziantou marked this conversation as resolved.
Outdated
{
name = name[1..];
break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public static bool HasFormatPlaceholders(string formatString)
var i = 0;
while (i < formatString.Length)
{
var braceIndex = formatString.IndexOf('{', i);
var braceIndex = formatString.IndexOf("{", i, StringComparison.Ordinal);
Comment thread
meziantou marked this conversation as resolved.
Outdated
if (braceIndex == -1)
return false;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ private static bool HasPlaceholders(string formatString)
while (i < formatString.Length)
{
// Use IndexOf to find the next '{' - this can be vectorized for better performance
var braceIndex = formatString.IndexOf('{', i);
var braceIndex = formatString.IndexOf("{", i, StringComparison.Ordinal);
Comment thread
meziantou marked this conversation as resolved.
Outdated
if (braceIndex == -1)
{
// No more opening braces
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Meziantou.NET.Sdk.Test">

<ItemGroup>
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.0" />
<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="10.0.9" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.4" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing" Version="1.1.4" />
Expand Down