Skip to content

Optimize DefaultIfNotSingle loop#430

Merged
rjmurillo merged 30 commits into
mainfrom
codex/refactor-loop-to-replace-where-predicate
Jun 9, 2025
Merged

Optimize DefaultIfNotSingle loop#430
rjmurillo merged 30 commits into
mainfrom
codex/refactor-loop-to-replace-where-predicate

refactor: extract argument validation into a separate method for Defa…

ae2f96a
Select commit
Loading
Failed to load commit list.
Codacy Production / Codacy Static Code Analysis required action Jun 8, 2025 in 0s

8 new issues (0 max.) of at least medium severity.

Codacy Here is an overview of what got changed by this pull request:

Issues
======
- Added 8
           

Complexity increasing per file
==============================
- src/Common/EnumerableExtensions.cs  1
- tests/Moq.Analyzers.Test/Common/EnumerableExtensionsTests.cs  1
- tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleImmutableArrayBenchmarks.cs  1
- tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleBaseline.cs  3
- tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleEnumerableNoPredicateBenchmarks.cs  1
- tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleOptimized.cs  4
- tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleEnumerableBenchmarks.cs  1
         

Clones added
============
- tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleBaseline.cs  1
- tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleOptimized.cs  1
         

See the complete overview on Codacy

Annotations

Check failure on line 1 in tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleBaseline.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleBaseline.cs#L1

Provide an 'AssemblyVersion' attribute for assembly 'srcassembly.dll'.

Check warning on line 8 in tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleBaseline.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleBaseline.cs#L8

Types should not have members with visibility set higher than the type's visibility

Check failure on line 1 in tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleEnumerableBenchmarks.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleEnumerableBenchmarks.cs#L1

Provide an 'AssemblyVersion' attribute for assembly 'srcassembly.dll'.

Check failure on line 1 in tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleEnumerableNoPredicateBenchmarks.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleEnumerableNoPredicateBenchmarks.cs#L1

Provide an 'AssemblyVersion' attribute for assembly 'srcassembly.dll'.

Check failure on line 1 in tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleImmutableArrayBenchmarks.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleImmutableArrayBenchmarks.cs#L1

Provide an 'AssemblyVersion' attribute for assembly 'srcassembly.dll'.

Check failure on line 1 in tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleOptimized.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleOptimized.cs#L1

Provide an 'AssemblyVersion' attribute for assembly 'srcassembly.dll'.

Check warning on line 8 in tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleOptimized.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Benchmarks/DefaultIfNotSingleOptimized.cs#L8

Types should not have members with visibility set higher than the type's visibility

Check failure on line 1 in tests/Moq.Analyzers.Test/Common/EnumerableExtensionsTests.cs

See this annotation in the file changed.

@codacy-production codacy-production / Codacy Static Code Analysis

tests/Moq.Analyzers.Test/Common/EnumerableExtensionsTests.cs#L1

Provide an 'AssemblyVersion' attribute for assembly 'srcassembly.dll'.