Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .claude/rules/common/file-formats.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ A section below overrides them for its own file type.
## C# source files (`*.cs`)

- Charset: UTF-8 without BOM, as for every other file.
- Every file opens with the copyright preamble whose text `stylecop.json` holds. SA1633, SA1634, and SA1636 check it.
- Every file opens with the copyright preamble whose text the StyleCop `copyrightText` setting holds. SA1633, SA1634, and SA1636 check it.
- A scratch `.cs` file under `.claude/scratchpad/` needs no preamble. The `Common.props` there turns StyleCop off.

## MSBuild XML files (`*.*proj`, `*.props`, `*.targets`)
Expand Down
13 changes: 12 additions & 1 deletion .claude/tools/inspect.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
*
* Both modes write one `path(line,col): severity ID: message` per diagnostic to standard output and nothing
* else, which is what the `$msCompile` problem matcher consumes; progress and failure context go to standard
* error. The raw output of the three child processes, and the SARIF report, are left in `.buildvana-temp`.
* error. The raw output of the three child processes, the SARIF report, and the inspectcode caches are left in
* `.buildvana-temp`. The caches start empty on every run.
*/

using System;
Expand Down Expand Up @@ -85,6 +86,7 @@

var scratchPath = Path.Combine(repoRoot, ".buildvana-temp");
var sarifPath = Path.Combine(scratchPath, "inspect.sarif");
var cachesPath = Path.Combine(scratchPath, "inspectcode-caches");

// bv's own narration: leveled lines (`info: ...`) and activity lines (`[1] Build: starting...`). Everything else
// a child writes is MSBuild's, which is far too verbose to echo.
Expand Down Expand Up @@ -206,12 +208,21 @@
// --all has to name the lowest severity rather than leave the option out: inspectcode's own default is
// WARNING, so omitting it would silently produce exactly what the gate produces.
var severity = all ? "HINT" : gate ? "WARNING" : "SUGGESTION";

// inspectcode reuses its cached results for files that have not changed, so a change to the inspection
// settings would reach only the changed files. An empty cache on every run reports every file afresh.
if (Directory.Exists(cachesPath))
{
Directory.Delete(cachesPath, recursive: true);
}

Console.Error.WriteLine($"info: running inspectcode at severity {severity} (this takes a while)...");
string[] inspectArguments = [
"dnx",
"JetBrains.ReSharper.GlobalTools",
"inspectcode",
"--swea",
$"--caches-home={cachesPath}",
$"--severity={severity}",
$"--output={sarifPath}",
"--format=Sarif",
Expand Down
7 changes: 7 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ resharper_property_can_be_made_init_only_global_highlighting = warning
# Entity Framework

# Formatting
resharper_bad_declaration_braces_line_breaks_highlighting = warning
resharper_bad_control_braces_line_breaks_highlighting = warning
resharper_bad_expression_braces_line_breaks_highlighting = warning

# Grammar Issues

Expand Down Expand Up @@ -138,3 +141,7 @@ resharper_class_never_instantiated_global_highlighting = none
resharper_unused_type_global_highlighting = none
resharper_unused_member_global_highlighting = none
resharper_member_can_be_private_global_highlighting = none

# A formatter setting, not a severity. BadDeclarationBracesLineBreaks splits every auto-property without it.
# The same setting in Buildvana.slnx.DotSettings has no effect.
resharper_csharp_place_abstract_accessorholder_on_single_line = true
1 change: 0 additions & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ THIRD-PARTY-NOTICES @rdeago
Directory.Build.* @rdeago
.editorconfig @rdeago
.globalconfig @rdeago
stylecop.json @rdeago
*.DotSettings @rdeago
NuGet.config @rdeago
/.buildvana/ @rdeago
Expand Down
1 change: 0 additions & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
- any-glob-to-any-file:
- '**/.editorconfig'
- '**/.globalconfig'
- '**/stylecop.json'
- '**/*.DotSettings'

'area:repo':
Expand Down
89 changes: 75 additions & 14 deletions .globalconfig
Original file line number Diff line number Diff line change
Expand Up @@ -239,9 +239,59 @@ dotnet_naming_style.begins_with_i.capitalization = pascal_case
# Ordering and grouping follows the categories listed in the official documentation.
# See https://github.com/DotNetAnalyzers/StyleCopAnalyzers/tree/master/documentation
# ----------------------------------------------------------------------------------------------
# Last update: 2026-06-21 (StyleCop.Analyzers v1.2.0-beta.556)
# Last update: 2026-10-20 (StyleCop.Analyzers v1.3.133-beta)
# ==============================================================================================

# StyleCop Analyzers - Settings
# Every setting is listed, defaults included, in the order of the settings reference:
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/Configuration.md#settings-reference
# A value cannot contain '#' or ';', because the compiler reads the rest of the line as a comment.
# StyleCop.Analyzers reads these settings from standard keys, set elsewhere:
# - indentation from indent_size, tab_width, and indent_style (.editorconfig);
# - systemUsingDirectivesFirst from dotnet_sort_system_directives_first;
# - usingDirectivesPlacement from csharp_using_directive_placement;
# - newlineAtEndOfFile from insert_final_newline (.editorconfig).

# Readability
stylecop.readability.allowBuiltInTypeAliases = true

# Ordering
stylecop.ordering.elementOrder = kind, accessibility, constant, static, readonly
# Setting memberKindOrder omitted: no value states its default, the predefined SA1201 order.
# The standard key dotnet_separate_import_directive_groups = false would read as "allow", not "omit".
stylecop.ordering.blankLinesBetweenUsingGroups = omit

# Naming
stylecop.naming.allowCommonHungarianPrefixes = true
stylecop.naming.allowedHungarianPrefixes = db, id, x
stylecop.naming.allowedNamespaceComponents =
stylecop.naming.includeInferredTupleElementNames = false
stylecop.naming.tupleElementNameCasing = pascalCase

# Maintainability
stylecop.maintainability.topLevelTypes = class, interface, struct, enum, delegate

# Layout
stylecop.layout.allowConsecutiveUsings = true
stylecop.layout.allowBracelessIfStatements = off
stylecop.layout.allowDoWhileOnClosingBrace = true

# Documentation
stylecop.documentation.documentExposedElements = true
stylecop.documentation.documentInternalElements = false
stylecop.documentation.documentPrivateElements = false
stylecop.documentation.documentPrivateFields = false
stylecop.documentation.documentInterfaces = all
# Do not change companyName and copyrightText here. See the solution-specific section at the end of this file.
stylecop.documentation.companyName = PlaceholderCompany
stylecop.documentation.copyrightText = Copyright (c) {companyName}. All rights reserved.
# Settings stylecop.documentation.variables.* omitted: copyrightText uses no variables.
stylecop.documentation.headerDecoration =
stylecop.documentation.xmlHeader = false
stylecop.documentation.fileNamingConvention = metadata
stylecop.documentation.documentationCulture = en-US
stylecop.documentation.excludeFromPunctuationCheck = exception, seealso

# StyleCop Analyzers - Special rules
dotnet_diagnostic.SA0001.severity = warning # XML comment analysis disabled
dotnet_diagnostic.SA0002.severity = warning # Invalid settings file
Expand Down Expand Up @@ -279,7 +329,7 @@ dotnet_diagnostic.SA1028.severity = warning # Code should not contain trailing w

# StyleCop Analyzers - Readability rules
dotnet_diagnostic.SA1100.severity = warning # Do not prefix calls with base unless local implementation exists
dotnet_diagnostic.SA1101.severity = none # Prefix local calls with this
dotnet_diagnostic.SA1101.severity = none # Prefix local calls with this # SX1101 is enabled instead
dotnet_diagnostic.SX1101.severity = warning # Do not prefix local calls with this
dotnet_diagnostic.SA1102.severity = warning # Query clause should follow previous clause
dotnet_diagnostic.SA1103.severity = warning # Query clauses should be on separate lines or all on one line
Expand Down Expand Up @@ -318,14 +368,17 @@ dotnet_diagnostic.SA1136.severity = warning # Enum values should be on separate
dotnet_diagnostic.SA1137.severity = warning # Elements should have the same indentation
# There is no SA1138 rule - https://github.com/DotNetAnalyzers/StyleCopAnalyzers/pull/2034
dotnet_diagnostic.SA1139.severity = warning # Use literal suffix notation instead of casting
dotnet_diagnostic.SA1141.severity = warning # Use tuple syntax
dotnet_diagnostic.SA1142.severity = warning # Refer to tuple elements by name
dotnet_diagnostic.SA1143.severity = none # Conditional expressions should be formatted consistently # Its chain layout puts operators at line ends, against our concatenated ternaries layout

# StyleCop Analyzers - Ordering rules
dotnet_diagnostic.SA1200.severity = warning # Using directives should be placed correctly
dotnet_diagnostic.SA1201.severity = warning # Elements should appear in the correct order
dotnet_diagnostic.SA1202.severity = warning # Elements should be ordered by access
dotnet_diagnostic.SA1203.severity = warning # Constants should appear before fields
dotnet_diagnostic.SA1204.severity = warning # Static elements should appear before instance elements
dotnet_diagnostic.SA1205.severity = none # Partial elements should declare access
dotnet_diagnostic.SA1205.severity = none # Partial elements should declare access # Declaring access more than once for the same type violates single source of truth
dotnet_diagnostic.SA1206.severity = warning # Declaration keywords should follow order
dotnet_diagnostic.SA1207.severity = warning # Protected should come before internal
dotnet_diagnostic.SA1208.severity = warning # System using directives should be placed before other using directives
Expand All @@ -345,20 +398,21 @@ dotnet_diagnostic.SA1301.severity = warning # Element should begin with lower-ca
dotnet_diagnostic.SA1302.severity = warning # Interface names should begin with I
dotnet_diagnostic.SA1303.severity = warning # Const field names should begin with upper-case letter
dotnet_diagnostic.SA1304.severity = warning # Non-private readonly fields should begin with upper-case letter
dotnet_diagnostic.SA1305.severity = none # Field names should not use Hungarian notation
dotnet_diagnostic.SA1305.severity = none # Field names should not use Hungarian notation # Nobody uses Hungarian notation anymore; this rule would flag names that are most probably prefixed for valid reasons
dotnet_diagnostic.SA1306.severity = warning # Field names should begin with lower-case letter
dotnet_diagnostic.SA1307.severity = warning # Accessible fields should begin with upper-case letter
dotnet_diagnostic.SA1308.severity = warning # Variable names should not be prefixed
dotnet_diagnostic.SA1309.severity = none # Private instance field names should not begin with underscore
dotnet_diagnostic.SA1309.severity = none # Private instance field names should not begin with underscore # SX1309 is enabled instead
dotnet_diagnostic.SX1309.severity = warning # Private instance field names should begin with underscore
dotnet_diagnostic.SX1309S.severity = none # Static field names should begin with underscore
dotnet_diagnostic.SX1309S.severity = none # Static field names should begin with underscore # SX1309 is enabled instead
dotnet_diagnostic.SA1310.severity = warning # Field names should not contain underscore
dotnet_diagnostic.SA1311.severity = warning # Static readonly fields should begin with upper-case letter
dotnet_diagnostic.SA1312.severity = warning # Variable names should begin with lower-case letter
dotnet_diagnostic.SA1313.severity = warning # Parameter names should begin with lower-case letter
dotnet_diagnostic.SA1314.severity = warning # Type parameter names should begin with T
# Rule SA1315 omitted in StyleCop Analyzers - https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1949
dotnet_diagnostic.SA1315.severity = warning # Parameter names should match inherited names
dotnet_diagnostic.SA1316.severity = warning # Tuple element names should use correct casing
dotnet_diagnostic.SA1317.severity = warning # Identifier should be named only with Latin letters

# StyleCop Analyzers - Maintainability rules
dotnet_diagnostic.SA1119.severity = warning # Statement should not use unnecessary parenthesis
Expand All @@ -369,17 +423,18 @@ dotnet_diagnostic.SA1403.severity = warning # File may only contain a single nam
dotnet_diagnostic.SA1404.severity = warning # Code analysis suppression should have justification
dotnet_diagnostic.SA1405.severity = warning # Debug.Assert should provide message text
dotnet_diagnostic.SA1406.severity = warning # Debug.Fail should provide message text
dotnet_diagnostic.SA1407.severity = none # Arithmetic expressions should declare precedence
dotnet_diagnostic.SA1407.severity = none # Arithmetic expressions should declare precedence # Conflicts with ReSharper's RedundantParentheses inspection
dotnet_diagnostic.SA1408.severity = warning # Conditional expressions should declare precedence
# Rule SA1409 omitted in StyleCop Analyzers - https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1058
dotnet_diagnostic.SA1410.severity = warning # Remove delegate parenthesis when possible
dotnet_diagnostic.SA1411.severity = warning # Attribute constructor should not use unnecessary parenthesis
dotnet_diagnostic.SA1412.severity = none # Store files as UTF-8 with byte order mark
dotnet_diagnostic.SA1412.severity = none # Store files as UTF-8 with byte order mark # SX1412 is enabled instead
dotnet_diagnostic.SX1412.severity = warning # Store files as UTF-8 without byte order mark
dotnet_diagnostic.SA1413.severity = warning # Use trailing comma in multi-line initializers
dotnet_diagnostic.SA1414.severity = warning # Tuple types in signatures should have element names

# StyleCop Analyzers - Layout rules
dotnet_diagnostic.SA1500.severity = warning # Braces for multi-line statements should not share line
dotnet_diagnostic.SA1500.severity = none # Braces for multi-line statements should not share line # Replaced by ReSharper's brace line break inspections, which put expression braces at end of line
dotnet_diagnostic.SA1501.severity = warning # Statement should not be on a single line
dotnet_diagnostic.SA1502.severity = warning # Element should not be on a single line
dotnet_diagnostic.SA1503.severity = warning # Braces should not be omitted
Expand All @@ -395,24 +450,24 @@ dotnet_diagnostic.SA1512.severity = warning # Single-line comments should not be
dotnet_diagnostic.SA1513.severity = warning # Closing brace should be followed by blank line
dotnet_diagnostic.SA1514.severity = warning # Element documentation header should be preceded by blank line
dotnet_diagnostic.SA1515.severity = warning # Single-line comment should be preceded by blank line
dotnet_diagnostic.SA1516.severity = none # Elements should be separated by blank line
dotnet_diagnostic.SA1516.severity = warning # Elements should be separated by blank line
dotnet_diagnostic.SA1517.severity = warning # Code should not contain blank lines at start of file
dotnet_diagnostic.SA1518.severity = warning # Use line endings correctly at end of file
dotnet_diagnostic.SA1519.severity = warning # Braces should not be omitted from multi-line child statement
dotnet_diagnostic.SA1520.severity = warning # Use braces consistently

# StyleCop Analyzers - Documentation rules
dotnet_diagnostic.SA1600.severity = warning # Elements should be documented
dotnet_diagnostic.SA1601.severity = none # Partial elements should be documented
dotnet_diagnostic.SA1601.severity = none # Partial elements should be documented # Elements should be documented once (single source of truth)
dotnet_diagnostic.SA1602.severity = warning # Enumeration items should be documented
# Rule SA1603 omitted in StyleCop Analyzers - https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1291
dotnet_diagnostic.SA1604.severity = warning # Element documentation should have summary
dotnet_diagnostic.SA1605.severity = warning # Partial element documentation should have summary
dotnet_diagnostic.SA1606.severity = warning # Element documentation should have summary text
dotnet_diagnostic.SA1607.severity = warning # Partial element documentation should have summary text
dotnet_diagnostic.SA1608.severity = warning # Element documentation should not have default summary
dotnet_diagnostic.SA1609.severity = none # Property documentation should have value
dotnet_diagnostic.SA1610.severity = none # Property documentation should have value text
dotnet_diagnostic.SA1609.severity = none # Property documentation should have value # Would add very little value in practice
dotnet_diagnostic.SA1610.severity = none # Property documentation should have value text # Would add very little value in practice
dotnet_diagnostic.SA1611.severity = warning # Element parameters should be documented
dotnet_diagnostic.SA1612.severity = warning # Element parameter documentation should match element parameters
dotnet_diagnostic.SA1613.severity = warning # Element parameter documentation should declare parameter name
Expand Down Expand Up @@ -455,6 +510,8 @@ dotnet_diagnostic.SA1649.severity = warning # File name should match first type
# Rule SA1650 omitted in StyleCop Analyzers - https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/1057
dotnet_diagnostic.SA1651.severity = warning # Do not use placeholder elements
# Rule SA1652 superseded by SA0001
dotnet_diagnostic.SA1653.severity = warning # Only one partial declaration should contain summary documentation
dotnet_diagnostic.SA1654.severity = warning # Properly encode generic brackets

# ==============================================================================================
# PUBLIC API ANALYZERS
Expand Down Expand Up @@ -528,6 +585,10 @@ dotnet_diagnostic.IDE0290.severity = none # Use primary constructor - No. Just n
# SOLUTION-SPECIFIC OVERRIDES
# ==============================================================================================

# These project-specific values are used for StyleCop documentation rules.
stylecop.documentation.companyName = Tenacom
stylecop.documentation.copyrightText = Copyright (C) Tenacom and Contributors. Licensed under the MIT license.\nSee the LICENSE file in the project root for full license information.

# Given the type of C# projects (compiled MSBuild tasks, CLI tool) we don't need to optimize logging with LoggerMessage delegates (CA1848),
# nor do we need CA1873 to complain that "argument evaluation may be expensive when logging is disabled".
# Disabling these rules globally helps keep code clean and simple without needing to sprinkle pragmas or suppressions around.
Expand Down
1 change: 0 additions & 1 deletion Buildvana.slnx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
<File Path="Directory.Build.props" />
<File Path="Directory.Build.targets" />
<File Path="nuget.config" />
<File Path="stylecop.json" />
<File Path="VERSION" />
</Folder>
<Folder Name="/- Dependencies/">
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ The patch number restarted from 1, below the 2.0.x versions already published.
- `bv release` rewrites each relative file link of the changelog section it releases into a permalink to the release tag.
- `bv release` runs the [build pipeline](docs/tool-commands/release.md#the-steps) once, from `clean` through `pack`, after the release commit, and no longer runs `clean` through `test` before it.
- [The pages under `docs/`](docs/README.md) moved to kebab-case names, `docs/modules/` to `docs/sdk-modules/`, and `docs/DependencyManagement.md` to `docs/tool-commands/dependencies.md`, so a link to an old name breaks.
- The `StandardAnalyzers` module adds [`StyleCop.Analyzers` 1.3.79-beta](docs/sdk-modules/standard-analyzers.md#package-references), which supports C# 8 to 15 and introduces SA1317 and SA1653.
- The `StandardAnalyzers` module adds [`StyleCop.Analyzers` 1.3.133-beta](docs/sdk-modules/standard-analyzers.md#package-references), which supports C# 8 to 15 and adds several new rules.

### Bugs fixed in this release

Expand Down
Loading
Loading