Skip to content

Commit e92a1b7

Browse files
committed
Formatting and disable warningsaserrors on tests
1 parent aceadc1 commit e92a1b7

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/Umbraco.Infrastructure/Migrations/Upgrade/V_15_0_0/ConvertBlockEditorPropertiesBase.cs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -84,16 +84,19 @@ protected override void Migrate()
8484
continue;
8585
}
8686

87-
_logger.LogInformation("Migration starting for all properties of type: {propertyEditorAlias}",
87+
_logger.LogInformation(
88+
"Migration starting for all properties of type: {propertyEditorAlias}",
8889
propertyEditorAlias);
8990
if (Handle(propertyTypes, languagesById))
9091
{
91-
_logger.LogInformation("Migration succeeded for all properties of type: {propertyEditorAlias}",
92+
_logger.LogInformation(
93+
"Migration succeeded for all properties of type: {propertyEditorAlias}",
9294
propertyEditorAlias);
9395
}
9496
else
9597
{
96-
_logger.LogError("Migration failed for one or more properties of type: {propertyEditorAlias}",
98+
_logger.LogError(
99+
"Migration failed for one or more properties of type: {propertyEditorAlias}",
97100
propertyEditorAlias);
98101
}
99102
}
@@ -154,7 +157,8 @@ private bool Handle(IPropertyType[] propertyTypes, IDictionary<int, ILanguage> l
154157
Task task;
155158
using (ExecutionContext.SuppressFlow())
156159
{
157-
task = Task.Run(() =>
160+
task = Task.Run(
161+
() =>
158162
{
159163
using ICoreScope scope = _coreScopeProvider.CreateCoreScope();
160164
scope.Complete();
@@ -173,7 +177,8 @@ private bool Handle(IPropertyType[] propertyTypes, IDictionary<int, ILanguage> l
173177
// NOTE: some old property data DTOs can have variance defined, even if the property type no longer varies
174178
var culture = propertyType.VariesByCulture()
175179
&& propertyDataDto.LanguageId.HasValue
176-
&& languagesById.TryGetValue(propertyDataDto.LanguageId.Value,
180+
&& languagesById.TryGetValue(
181+
propertyDataDto.LanguageId.Value,
177182
out ILanguage? language)
178183
? language.IsoCode
179184
: null;

src/Umbraco.Infrastructure/PropertyEditors/BlockValuePropertyIndexValueFactoryBase.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,7 @@ protected IEnumerable<RawDataItem> GetDataItems(IList<BlockItemData> contentData
136136
indexData.Add(
137137
ToRawData(
138138
blockItemData.ContentTypeKey,
139-
blockItemData.Values.Where(value => value.Culture is null || exposedCultures.Contains(value.Culture))
140-
)
141-
);
139+
blockItemData.Values.Where(value => value.Culture is null || exposedCultures.Contains(value.Culture))));
142140
}
143141

144142
return indexData;

tests/Directory.Build.props

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
<IsPackable>false</IsPackable>
99
<BaseEnablePackageValidation>$(EnablePackageValidation)</BaseEnablePackageValidation>
1010
<EnablePackageValidation>false</EnablePackageValidation>
11+
<TreatWarningsAsErrors>false</TreatWarningsAsErrors>
1112
</PropertyGroup>
12-
13+
1314
<PropertyGroup>
1415
<!-- TODO: Update test projects to use nullable reference types and remove this to enable nullable warnings as errors (the solution default) -->
1516
<Nullable>annotations</Nullable>

0 commit comments

Comments
 (0)