Skip to content

Commit b9be136

Browse files
committed
Update .editorconfig from 2.1.0 to 3.0.0
1 parent 677c33a commit b9be136

File tree

10 files changed

+24
-9
lines changed

10 files changed

+24
-9
lines changed

.editorconfig

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Version: 2.1.0 (Using https://semver.org/)
2-
# Updated: 2021-03-03
1+
# Version: 3.0.0 (Using https://semver.org/)
2+
# Updated: 2021-08-09
33
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
44
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
55
# See http://EditorConfig.org for more information about .editorconfig files.
@@ -48,7 +48,7 @@ indent_size = 2
4848
trim_trailing_whitespace = false
4949

5050
# Web Files
51-
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,svg,vue}]
51+
[*.{htm,html,js,jsm,ts,tsx,css,sass,scss,less,pcss,svg,vue}]
5252
indent_size = 2
5353

5454
# Batch Files
@@ -97,7 +97,7 @@ dotnet_style_readonly_field = true:warning
9797
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
9898
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
9999
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
100-
dotnet_style_parentheses_in_other_operators = always_for_clarity:suggestion
100+
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:warning
101101
# Expression-level preferences
102102
dotnet_style_object_initializer = true:warning
103103
dotnet_style_collection_initializer = true:warning
@@ -121,7 +121,10 @@ dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
121121
# If you use StyleCop, you'll need to disable SA1636: File header copyright text should match.
122122
# dotnet_diagnostic.SA1636.severity = none
123123
# Undocumented
124-
dotnet_style_operator_placement_when_wrapping = end_of_line
124+
dotnet_style_operator_placement_when_wrapping = end_of_line:warning
125+
csharp_style_prefer_null_check_over_type_check = true:warning
126+
dotnet_style_namespace_match_folder = true:suggestion
127+
dotnet_diagnostic.IDE0130.severity = suggestion
125128

126129
# C# Style Rules
127130
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/style-rules/language-rules#c-style-rules
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using System;
2+
3+
[assembly: CLSCompliant(true)]

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<PropertyGroup Label="Build">
44
<LangVersion>latest</LangVersion>
55
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
6+
<AnalysisMode>Default</AnalysisMode>
67
<AnalysisLevel>latest</AnalysisLevel>
78
<NeutralLanguage>en-GB</NeutralLanguage>
89
<Nullable>enable</Nullable>

Source/Common/ValuesJsonConverter.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ private static bool TryGetConcreteType(
415415
if (localType is not null && ThingInterfaceTypeInfo.IsAssignableFrom(localType.GetTypeInfo()))
416416
{
417417
type = localType;
418-
return type is not null;
418+
return true;
419419
}
420420
else
421421
{
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using System;
2+
3+
[assembly: CLSCompliant(true)]
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using System;
2+
3+
[assembly: CLSCompliant(true)]

Tools/Schema.NET.Tool/SchemaSourceGenerator.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
namespace Schema.NET.Tool
22
{
33
using System;
4-
using System.Collections.Generic;
54
using System.Linq;
65
using System.Reflection;
76
using Microsoft.CodeAnalysis;

Tools/Schema.NET.Tool/Services/SchemaService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private static GeneratorSchemaClass TranslateClass(
220220
HashSet<Uri> knownSchemaClasses,
221221
bool includePending)
222222
{
223-
var className = StartsWithNumber.IsMatch(schemaClass.Label) ? $"_{schemaClass.Label}" : schemaClass.Label;
223+
var className = StartsWithNumber.IsMatch(schemaClass.Label) ? $"Type{schemaClass.Label}" : schemaClass.Label;
224224
var @class = new GeneratorSchemaClass(schemaClass.Layer, schemaClass.Id, className, schemaClass.Comment);
225225

226226
@class.Parents.AddRange(schemaClass.SubClassOfIds

Tools/Schema.NET.Updater/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ private static async Task Main()
1717
{
1818
Console.WriteLine("Downloading '{0}'...", SchemaJsonSourceUrl);
1919
using var httpClient = new HttpClient();
20-
using var stream = await httpClient.GetStreamAsync(SchemaJsonSourceUrl).ConfigureAwait(true);
20+
using var stream = await httpClient.GetStreamAsync(new Uri(SchemaJsonSourceUrl)).ConfigureAwait(true);
2121
Console.WriteLine("Saving to '{0}'...", SchemaJsonDestinationFilePath);
2222
using var fileStream = File.Open(SchemaJsonDestinationFilePath, FileMode.Create);
2323
await stream.CopyToAsync(fileStream).ConfigureAwait(true);
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using System;
2+
3+
[assembly: CLSCompliant(true)]

0 commit comments

Comments
 (0)