Skip to content

feat: adopt build-standards submodule for shared configuration#15

Merged
jas88 merged 11 commits into
mainfrom
feat/build-standards
Dec 15, 2025
Merged

feat: adopt build-standards submodule for shared configuration#15
jas88 merged 11 commits into
mainfrom
feat/build-standards

Conversation

@jas88

@jas88 jas88 commented Dec 11, 2025

Copy link
Copy Markdown
Owner

Summary

This PR adopts the shared build-standards submodule to standardize configuration across the jas88 .NET projects.

Changes

  • Added build-standards submodule at commit reference for shared configuration management
  • Added .editorconfig via symlink to build-standards for consistent code formatting
  • Added .pre-commit-config.yaml via symlink to build-standards for automated code quality checks
  • Added nuget.config to centralize NuGet feed configuration
  • Updated Directory.Build.props to:
    • Import shared build-standards properties
    • Consolidate package versioning (fo-dicom, FAnsi, CommandLineParser, etc.)
    • Enable deterministic builds and source link
    • Configure code analysis and warnings as errors
  • Preserved GPL-3.0 license - no license changes

Benefits

  • Consistent build configuration across all jas88 projects
  • Centralized dependency version management
  • Automated code quality enforcement via pre-commit hooks
  • Improved build reproducibility with deterministic builds
  • Better IDE integration with standardized EditorConfig

Testing

  • Build and tests pass locally
  • No functional changes to SynthDicom behavior
  • Configuration changes only

Summary by cubic

Standardized build and repo configuration using the build-standards submodule. Centralized NuGet, preserved GPL licensing, fixed CI submodule checkout and triggers, standardized Dependabot (incl. gitsubmodule), added Codecov coverage reporting, and updated README badges (NuGet via shields.io, Codecov, SonarCloud); no functional changes.

  • Refactors

    • Import build-standards/Directory.Build.props.shared and set PackageLicenseExpression to GPL-3.0-or-later.
    • Keep ImplicitUsings and GenerateAssemblyInfo disabled; add Microsoft.SourceLink.GitHub.
    • Add .editorconfig and .pre-commit-config.yaml; add nuget.config locked to nuget.org.
    • Add Directory.Packages.props for central package management to pin versions and fix NU1604; update build-standards to address NU5017 pack error.
    • Collect coverage in CI and publish to Codecov; update README badges (Codecov, NuGet via shields.io, SonarCloud) and remove CodeQL badge.
    • Standardize Dependabot schedule; add gitsubmodule ecosystem.
    • Fix analyzer warnings across the codebase (ordinal string comparisons, culture-invariant parsing, sealed classes, specific exception types).
    • Tweak CI triggers to avoid duplicate runs on push and PR; enable recursive submodule checkout.
  • Migration

    • Run: git submodule update --init.
    • Install pre-commit: pip install pre-commit && pre-commit install.

Written for commit 0f41ee2. Summary will update automatically on new commits.

High-level PR Summary

This PR adopts a shared build-standards submodule to standardize configuration across jas88 .NET projects. It adds centralized NuGet feed configuration, imports shared build properties while preserving project-specific overrides (GPL-3.0 license, disabled implicit usings), and introduces consistent code formatting rules via .editorconfig and automated quality checks through pre-commit hooks. The changes are purely configuration-related with no functional code modifications.

⏱️ Estimated Review Time: 15-30 minutes

💡 Review Order Suggestion
Order File Path
1 nuget.config
2 .gitmodules
3 build-standards
4 Directory.Build.props
5 .editorconfig
6 .pre-commit-config.yaml

Need help? Join our Discord

Copilot AI review requested due to automatic review settings December 11, 2025 15:21

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adopts a shared build-standards submodule to standardize build configuration, code formatting, and quality checks across jas88 .NET projects. The changes consolidate build properties, enable automated code quality enforcement, and maintain the GPL-3.0 license while importing shared MIT-licensed build configurations.

  • Adds build-standards submodule with symlinked .editorconfig and .pre-commit-config.yaml for consistency
  • Refactors Directory.Build.props to import shared properties while preserving GPL-3.0 license and local overrides
  • Adds nuget.config for centralized NuGet feed management

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
.gitmodules Adds build-standards submodule reference
build-standards Submodule commit reference for shared configuration
nuget.config Centralizes NuGet package source configuration
Directory.Build.props Imports shared build properties with repository-specific overrides
.editorconfig Adds comprehensive C# code formatting and analysis rules
.pre-commit-config.yaml Configures pre-commit hooks for automated code quality checks

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

@recurseml recurseml Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review by RecurseML

🔍 Review performed on fa715af..7c26889

✨ No bugs found, your code is sparkling clean

✅ Files analyzed, no issues (5)

.editorconfig
.gitmodules
.pre-commit-config.yaml
Directory.Build.props
nuget.config

jas88 added 10 commits December 11, 2025 09:43
- Remove redundant CodeQL badge (pass/fail status is redundant with CI badge)
- Update NuGet badge to use shields.io (buildstats.info is deprecated)
Fix CI build failure caused by NU1604 errors. Without this file,
packages referenced in Directory.Build.props.shared (MinVer,
DotNet.ReproducibleBuilds, coverlet.collector) have no version
numbers, causing NuGet to fail with "no inclusive lower bound" errors.
…kage management

With ManagePackageVersionsCentrally enabled in Directory.Packages.props,
version numbers must not be specified on PackageReference items (NU1008).
Versions are now managed centrally in Directory.Packages.props.
Fix CA1310 and CA1305 code analysis errors:
- EndsWith() now uses StringComparison.Ordinal
- int.Parse() now uses CultureInfo.InvariantCulture
Fixed all code analysis errors introduced by build-standards:
- CA1305/CA1304: Added CultureInfo.InvariantCulture to locale-sensitive operations
- CA1309: Changed string comparisons to ordinal
- CA1852: Sealed classes with no subtypes
- CA1707: Suppressed for test methods via .editorconfig
- CA1859: Changed interface types to concrete implementations
- CA2201: Changed Exception to InvalidOperationException

Also fixed CI workflow to avoid duplicate runs on push and PR.
@sonarqubecloud

Copy link
Copy Markdown

@jas88 jas88 merged commit 3dc251e into main Dec 15, 2025
3 checks passed
@jas88 jas88 deleted the feat/build-standards branch December 15, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants