ci: add static analysis enforcement to build pipeline#11025
Conversation
b8daebd to
711ddf7
Compare
0bfec57 to
abf0380
Compare
|
@claude review please |
|
Claude finished @newmanifold's task in 1m 55s —— View job PR Review: ci: add Roslyn code style enforcement to build pipeline
SummaryThis is a well-scoped CI quality PR. The workflow design, editorconfig changes, and bulk source fixes are all reasonable. One functional bug in the workflow step and a few minor nits below. Issues🔴 Bug: Build exit code is silently swallowed —
|
|
@claude review again |
|
Claude finished @newmanifold's task in 2m 3s —— View job PR Review: ci: add Roslyn code style enforcement to build pipeline
Previous Issues — Now Resolved
Double blank lines — cleaned up in New Observations🟡
|
EVM Opcode Benchmark DiffAggregated runs: base=1, pr=1 No significant regressions or improvements detected. |
| using System.Runtime.InteropServices; | ||
| using System.Threading; | ||
| using Nethermind.Core; | ||
| #if ZK_EVM |
There was a problem hiding this comment.
maybe remove it and make the Dictionaries fully qualified when used.
There was a problem hiding this comment.
It would be more ugly, type of _spanDb is conditional based on what whether ZK_EVM is defined, so after this we will have to use #if ZK_EVM sites where extension methods are used.
| // SPDX-FileCopyrightText: 2022 Demerzel Solutions Limited | ||
| // SPDX-License-Identifier: LGPL-3.0-only | ||
|
|
||
| #if ZK_EVM |
There was a problem hiding this comment.
maybe remove it and make the Dictionaries fully qualified when used.
Any suggestions are welcomed, but we should probably do that in next PRs |
Add the following rules to .editorconfig (CI-enforced via EnforceCodeStyleInBuild): - IDE0005: remove unnecessary using directives - IDE0008: use explicit type instead of var when type is not apparent - IDE0041: use is null instead of ReferenceEquals - IDE0100: remove redundant equality expressions - CA1507: use nameof instead of string literal - CA1510: use ArgumentNullException.ThrowIfNull - CA1825: use Array.Empty<T>() for zero-length arrays - CA1829: use Count property instead of Enumerable.Count() - CA1834: use StringBuilder.Append(char) for single characters Fix all pre-existing violations across the codebase.
d65cc86 to
a2ebc9f
Compare
Changes
Code LintCI workflow that runsdotnet buildwithEnforceCodeStyleInBuild=trueand fails on anyIDE*orCA*analyzer warnings.editorconfig:varwhen type is not apparentis nullinstead ofReferenceEqualsnameofinstead of string literalArgumentNullException.ThrowIfNullArray.Empty<T>()for zero-length array allocationsCountproperty instead ofEnumerable.Count()StringBuilder.Append(char)for single-character appendsTypes of changes
What types of changes does your code introduce?
Testing
Requires testing
Documentation
Requires documentation update
Requires explanation in Release Notes