Skip to content
Merged
Changes from all 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
7 changes: 1 addition & 6 deletions src/Umbraco.PublishedCache.NuCache/ContentStore.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System.Collections.Concurrent;

Check notice on line 1 in src/Umbraco.PublishedCache.NuCache/ContentStore.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v13/dev)

✅ Getting better: Lines of Code in a Single File

The lines of code decreases from 1189 to 1185, improve code health by reducing it to 1000. The number of Lines of Code in a single file. More Lines of Code lowers the code health.

Check notice on line 1 in src/Umbraco.PublishedCache.NuCache/ContentStore.cs

View check run for this annotation

CodeScene Delta Analysis / CodeScene Cloud Delta Analysis (v13/dev)

✅ Getting better: Overall Code Complexity

The mean cyclomatic complexity decreases from 4.38 to 4.37, threshold = 4. This file has many conditional statements (e.g. if, for, while) across its implementation, leading to lower code health. Avoid adding more conditionals.
using System.Diagnostics.CodeAnalysis;
using CSharpTest.Net.Collections;
using Microsoft.Extensions.Logging;
Expand Down Expand Up @@ -321,17 +321,12 @@
{
if (_writeLock.CurrentCount != 0)
{
throw new InvalidOperationException("Write lock must be acquried.");
throw new InvalidOperationException("Write lock must be acquired.");
}
}

private void Lock(WriteLockInfo lockInfo, bool forceGen = false)
{
if (_writeLock.CurrentCount == 0)
{
throw new InvalidOperationException("Recursive locks not allowed");
}

if (_writeLock.Wait(_monitorTimeout))
{
lockInfo.Taken = true;
Expand Down
Loading