diff --git a/.editorconfig b/.editorconfig index df96769..6d0e3c9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -82,11 +82,6 @@ dotnet_diagnostic.IDE0078.severity = none [*.{cs,vb}] dotnet_diagnostic.IDE0290.severity = none -# CA1200: Avoid using cref tags with a prefix -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1200 -[*.{cs,vb}] -dotnet_diagnostic.CA1200.severity = none - # IDE0305: Use collection expression for fluent # https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0305 [*.{cs,vb}] @@ -179,15 +174,3 @@ dotnet_diagnostic.IDE0032.severity = none # Excluded becuase of inconsistency with other analyzers [*.{cs,vb}] dotnet_diagnostic.IDE0036.severity = none - -# Order modifiers -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036 -# Excluded becuase of inconsistency with other analyzers -[*.{cs,vb}] -dotnet_diagnostic.IDE0036.severity = none - -# Use 'System.Threading.Lock' -# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0330 -# Excluded while TFMs are less than net9.0 -[*.{cs,vb}] -dotnet_diagnostic.IDE0330.severity = none diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index c22d855..e9c9423 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -1,52 +1,79 @@ -# Contributing to `Unitify API by Codebelt` -When contributing to this repository, please first discuss the change you wish to make via issue, -email, or any other method with the owners of this repository before making a change. +# Contributing to Unitify API by Codebelt -Please note we have a code of conduct, please follow it in all your interactions with the project. +This repository is part of the Codebelt .NET library estate. The instructions below describe the current checkout and its CI contract. Please keep changes focused and preserve the shared Codebelt build skeleton unless a deliberate policy change is being made. -## Code of Conduct -Please review our [code of conduct](CODE_OF_CONDUCT.md). +## Before you start -## Our Development Process -We use `trunk` based branching model that is aligned with todays DevSecOps practices. -All new features and/or fixes are merged into the `main` branch by creating a Pull Request. +- Read the repository `README.md` and open an issue before starting a non-trivial feature or behavioral change. +- Use an installed .NET SDK that can build the target frameworks listed below. This repository currently targets: **net10.0, net9.0**. +- The solution is `Codebelt.Unitify.slnx`. Central package versions are maintained in `Directory.Packages.props`. +- The shared build behavior is in `Directory.Build.props` and `Directory.Build.targets`; repository-specific TFMs, package references and metadata remain local to this library. -## Pull Requests -We actively welcome your pull requests. +## Repository shape -1. Fork the repo and create your branch from `main` -2. If you've added code that should be tested, add tests (DO follow [Microsoft Engineering Guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines)) -3. Any changes or additions requires documentation in the form of documenting public members -4. Ensure that all existing as well as new test passes -5. Issue that pull request with a big and heartful thanks for contributing +- `src/` contains production projects. +- `test/` contains xUnit v3 test projects. +- `Codebelt.Unitify.slnx` is the solution used for local development. +- `.github/workflows/ci-pipeline.yml` is the CI workflow and the authority for the test matrix. +- `testenvironments.json` declares the supported `WSL-Ubuntu` and `Docker-Ubuntu` test environments. -## Issues -We use GitHub issues to track public bugs. Please ensure your description is -clear and has sufficient instructions to be able to reproduce the issue. +## Build + +Restore and build the solution from the repository root: + +```powershell +dotnet restore "Codebelt.Unitify.slnx" +dotnet build "Codebelt.Unitify.slnx" --configuration Release --no-restore +``` + +CI builds both Debug and Release configurations. A clean build should complete before opening a pull request. + +## Test + +Run tests one project at a time so a failing or hanging project is attributable. This mirrors the CI matrix; it does not silently turn skipped integration tests into passing tests. + +```powershell +$testProjects = Get-ChildItem test -Filter *.csproj -Recurse +foreach ($project in $testProjects) { + dotnet test $project.FullName --configuration Release --no-restore +} +``` + +The CI test plan currently runs **1** project(s) and excludes **0** project(s). The workflow also has an optional macOS test job. + +## Integration and infrastructure -## Coding Guidelines -* Please follow [Framework Design Guidelines](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/) -* Please follow SOLID principles -* Please follow [Microsoft Engineering Guidelines](https://github.com/dotnet/aspnetcore/wiki/Engineering-guidelines) +- `WSL-Ubuntu` — WSL distribution `Ubuntu-24.04`. +- `Docker-Ubuntu` — Docker image `codebeltnet/ubuntu-testrunner:8-9-10-11`. -## Manifesto -As aspiring Software Craftsmen we are raising the bar of professional software development by practicing it and helping others learn the craft. +This repository has no repository-local `docker-compose.yml` service dependency in the current checkout. +Use the environments declared in `testenvironments.json` when you need the estate test runner. -Through this work we have come to value: +## Package and documentation -* Not only working software, -but also well-crafted software -* Not only responding to change, -but also steadily adding value -* Not only individuals and interactions, -but also a community of professionals -* Not only customer collaboration, -but also productive partnerships +Create packages using the same solution and Release configuration: -That is, in pursuit of the items on the left we have found the items on the right to be indispensable. +```powershell +dotnet pack "Codebelt.Unitify.slnx" --configuration Release --no-restore +``` -[Manifesto for Software Craftsmanship](https://manifesto.softwarecraftsmanship.org/) is the originator of this text. +Package-specific release notes live under `.nuget//PackageReleaseNotes.txt` and package README files live beside them. `Directory.Build.targets` imports the release notes during packing. Public API changes also require XML documentation updates; DocFX documentation is built by the repository automation. + +## Pull requests + +1. Create or join an issue before substantial work, then fork the repository and create a branch from `main`. +2. Add or update focused tests and public API documentation where applicable. +3. Run restore, build, and the relevant per-project tests locally. +4. Keep the pull request small, explain the behavior change and validation performed, and wait for the CI checks to pass. + +## Issues + +Include the affected project, target framework, operating system, SDK version, exact command, expected result, actual result, and a minimal reproduction. Identify whether the behavior differs between local Windows/WSL, Docker-Ubuntu and GitHub Actions. + +## Coding guidelines + +Follow the existing style, the Framework Design Guidelines, the repository `.editorconfig`, and the shared Codebelt conventions. Do not make unrelated formatting or infrastructure changes in a feature pull request. ## License -By contributing to `Unitify API by Codebelt`, you agree that your contributions will be licensed -under the MIT license. + +By contributing to Unitify API by Codebelt, you agree that your contributions will be licensed under the MIT license. diff --git a/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt b/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt index b5ec98b..ae2d9ed 100644 --- a/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt +++ b/.nuget/Codebelt.Unitify/PackageReleaseNotes.txt @@ -1,3 +1,9 @@ +Version: 10.0.12 +Availability: .NET 10 and .NET 9 + +# ALM +- CHANGED Dependencies have been upgraded to the latest compatible versions for all supported target frameworks (TFMs) + Version: 10.0.11 Availability: .NET 10 and .NET 9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 85c4c20..ac59cfb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,32 @@ For more details, please refer to `PackageReleaseNotes.txt` on a per assembly ba > [!NOTE] > Changelog entries prior to version 9.0.0 was migrated from previous versions of [Cuemon.Core](https://github.com/gimlichael/Cuemon/commit/83e0c7af2cdaa07351e878fa7276558838f2e7e6). +## [10.0.12] - 2026-09-12 + +This is a patch release focused on test infrastructure modernization, code coverage tooling modernization, +build system enhancements, and contribution guidelines alignment with the Codebelt estate. + +### Added + +- `global.json` configuration for explicit Microsoft.Testing.Platform test runner specification, +- `.gitattributes` file for consistent line-ending normalization across the repository. + +### Changed + +- Codebelt.Extensions.Xunit.App upgraded from 11.2.1 to 12.0.1 for enhanced xUnit v3 and Microsoft.Testing.Platform support, +- Microsoft.NET.Test.Sdk upgraded from 18.9.0 to 18.10.0 for improved test runner compatibility, +- Cuemon.Core upgraded from 10.7.0 to 10.7.1 with latest improvements across all supported target frameworks, +- MinVer upgraded from 7.0.0 to 8.0.0 for semantic versioning enhancements, +- xunit.v3 upgraded from 3.2.2 to 4.0.0 for major test framework improvements, +- xunit.v3.runner.console upgraded from 3.2.2 to 4.0.0 for Microsoft.Testing.Platform alignment, +- xunit.runner.visualstudio upgraded from 3.1.5 to 4.0.0 for Visual Studio integration with the latest test infrastructure, +- `.editorconfig` cleaned up to remove obsolete analyzer rules (CA1200, IDE0330) and duplicate IDE0036 entry, +- `.github/CONTRIBUTING.md` completely restructured to align with Codebelt estate guidelines, including clear build instructions, per-project testing procedures, integration environment documentation, and pull request workflow. + +### Removed + +- coverlet.msbuild and coverlet.collector packages, replaced by Microsoft.Testing.Extensions.CodeCoverage for modern test coverage analysis. + ## [10.0.11] - 2026-08-16 This is a patch release focused on dependency upgrades, Docker test environment consolidation, and test infrastructure improvements. @@ -207,7 +233,8 @@ This is a service update that primarily focuses on package dependencies and mino - ByteUnit class in the Codebelt.Unitify namespace to have 0 duplicated blocks of lines of code - UnitPrefixFormatter class in the Codebelt.Unitify namespace to be compliant with https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822 -[Unreleased]: https://github.com/codebeltnet/unitify/compare/v10.0.11...HEAD +[Unreleased]: https://github.com/codebeltnet/unitify/compare/v10.0.12...HEAD +[10.0.12]: https://github.com/codebeltnet/unitify/compare/v10.0.11...v10.0.12 [10.0.11]: https://github.com/codebeltnet/unitify/compare/v10.0.10...v10.0.11 [10.0.10]: https://github.com/codebeltnet/unitify/compare/v10.0.9...v10.0.10 [10.0.9]: https://github.com/codebeltnet/unitify/compare/v10.0.8...v10.0.9 diff --git a/Directory.Build.props b/Directory.Build.props index 6f41909..a97e27f 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -70,20 +70,13 @@ + all runtime; build; native; contentfiles; analyzers; buildtransitive - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - - - all - runtime; build; native; contentfiles; analyzers; buildtransitive - diff --git a/Directory.Packages.props b/Directory.Packages.props index 907362d..daef56d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,16 +1,15 @@ - - - true - - - - - - - - - - - - + + + true + + + + + + + + + + + \ No newline at end of file diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +}