Restructure project layout to more modern form - #36
Open
rheone wants to merge 10 commits into
Open
Conversation
rheone
commented
Jul 5, 2026
Member
- Migrate from .sln to .slnx solution format, placed at repo root
- Move config files (global.json, .csharpierrc.json, stylecop.json) from src/ to repo root
- Replace src/.editorconfig with expanded root .editorconfig
- Add MSBuild infrastructure: Directory.Build.props, Directory.Build.targets, Directory.Packages.props (Central Package Management)
- Add smoketests/ directory with test project, run scripts (.sh/.ps1), and README
- Add CI/CD workflows: CodeQL, dependency review, Scorecard, smoke tests
- Add community/security files: CONTRIBUTING.md, SECURITY.md, .pre-commit-config.yaml
- Add benchmark run scripts (src/run-benchmarks.sh, src/run-benchmarks.ps1)
- Add test config (src/.runsettings)
- Update .gitignore, .gitattributes, .config/dotnet-tools.json, Husky hooks
- Update .csproj files and packages.lock.json for main project and tests
- Migrate from .sln to .slnx solution format, placed at repo root - Move config files (global.json, .csharpierrc.json, stylecop.json) from src/ to repo root - Replace src/.editorconfig with expanded root .editorconfig - Add MSBuild infrastructure: Directory.Build.props, Directory.Build.targets, Directory.Packages.props (Central Package Management) - Add smoketests/ directory with test project, run scripts (.sh/.ps1), and README - Add CI/CD workflows: CodeQL, dependency review, Scorecard, smoke tests - Add community/security files: CONTRIBUTING.md, SECURITY.md, .pre-commit-config.yaml - Add benchmark run scripts (src/run-benchmarks.sh, src/run-benchmarks.ps1) - Add test config (src/.runsettings) - Update .gitignore, .gitattributes, .config/dotnet-tools.json, Husky hooks - Update .csproj files and packages.lock.json for main project and tests
Dependency ReviewThe following issues were found:
Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. License Issues.github/workflows/scorecard.yml
.github/workflows/smoke-test.yml
smoketests/SmokeTests/SmokeTests.csproj
src/NetDuid.Benchmarks/NetDuid.Benchmarks.csproj
src/NetDuid.Tests/NetDuid.Tests.csproj
src/NetDuid/NetDuid.csproj
OpenSSF ScorecardScorecard details
Scanned Files
|
Summary
Risk Hotspots
Coverage
|
|
|
||
| var small = new Duid(new byte[] { 0x00, 0x01, 0x00, 0x01 }); | ||
| var medium = new Duid(new byte[] { 0x00, 0x01, 0x00, 0x01, 0x02 }); | ||
| var large = new Duid(new byte[] { 0x00, 0x01, 0x00, 0x01, 0x02, 0x03 }); |
| "Equals null", | ||
| () => | ||
| { | ||
| Require(!a.Equals(null), "a.Equals(null) is false"); |
| var y = new Duid(new byte[] { 0x00, 0x01, 0x00, 0x01, 0x01 }); | ||
| Require(x.CompareTo(y) < 0, "x < y"); | ||
| Require(y.CompareTo(x) > 0, "y > x"); | ||
| Require(x.CompareTo(x) == 0, "x == x"); |
| var y = new Duid(new byte[] { 0x00, 0x01, 0x00, 0x01, 0x01 }); | ||
| Require(x.CompareTo(y) < 0, "x < y"); | ||
| Require(y.CompareTo(x) > 0, "y > x"); | ||
| Require(x.CompareTo(x) == 0, "x == x"); |
Comment on lines
+21
to
+25
| catch (Exception ex) | ||
| { | ||
| Console.WriteLine($" [FAIL] {name}: {ex.Message}"); | ||
| failed++; | ||
| } |
- Migrate from .sln to .slnx solution format, placed at repo root - Move config files (global.json, .csharpierrc.json, stylecop.json) from src/ to repo root - Replace src/.editorconfig with expanded root .editorconfig - Add MSBuild infrastructure: Directory.Build.props, Directory.Build.targets, Directory.Packages.props (Central Package Management) - Add smoketests/ directory with test project, run scripts (.sh/.ps1), and README - Add CI/CD workflows: CodeQL, dependency review, Scorecard, smoke tests - Add community/security files: CONTRIBUTING.md, SECURITY.md, .pre-commit-config.yaml - Add benchmark run scripts (src/run-benchmarks.sh, src/run-benchmarks.ps1) - Add test config (src/.runsettings) - Update .gitignore, .gitattributes, .config/dotnet-tools.json, Husky hooks - Update .csproj files and packages.lock.json for main project and tests
* Fix smoketest project build and test failures - Add Version to PackageReference so -p:NetDuidVersion is consumed - Add --framework to build step so net48 isn't built on Linux runners - Add HUSKY:0 env var to prevent Husky hooks from failing on CI - Fix CS1718 warning by using a separate instance for self-comparison - Fix GetBytes read-only test to verify snapshot semantics instead of incorrectly checking for ICollection<T> interface absence * fixes failing minimal smoketest
…nd test quality (#39) * fix: trivial production code improvements - M1: <remark> → <remarks> in Duid.IComparable.cs - L1: Typo 'of RFC6355' → 'or RFC6355' in DuidType.cs - M2: Replace obscure HexCharToUpper with char.ToUpperInvariant - M3: Division/modulo → bit shifts for nibble extraction in IFormattable - L3: Rename DuidRegexSource → DuidRegexPatterns for clarity * perf: refactor DelimitedStringToBytes to use List<byte> M8: Replace over-allocated array + Buffer.BlockCopy with List<byte> that grows dynamically, eliminating wasted memory for inputs with single-digit hex octets. * fix: configuration and CI improvements H1: Remove unconditional Microsoft.Bcl.HashCode (only needed for netstandard2.0) H3: Remove dead TargetFrameworks from Directory.Build.props H4: Fix double-encoded XML entity in test csproj C1: Add --configuration Release to CI build for TreatWarningsAsErrors C2: Add test step to publish workflow C3: Fix wrong global.json path in CONTRIBUTING.md C5: Collect coverage for net8.0 and net9.0 on Ubuntu C6: Update stale smoke test docs in AGENTS.md C8: Fix smoke test hex string length mismatch * fix: Equals allocation and Lazy HashCode extraction H2: Replace other.GetBytes() with other._duidBytes in Equals(Duid) X2: Make Equals consistent with CompareTo field access pattern M4: Extract _lazyHashCode initialization into InitializeLazyHashCode() * test: improve test quality and coverage T1: Rename misnamed Equal_Object_NotDuid test T3: Add constructor test with List<byte> (non-array IEnumerable) T4: Replace CompareTo-derived test data with independent expected values T5: Add hash code stability and inequality tests * fix: remove commented-out code and fix helper method - Remove commented-out old HexCharToUpper method (triggers S125) - Revert InitializeLazyHashCode to inline initialization (readonly field cannot be assigned from non-constructor method in partial class) * warning / message cleanup * updating readme and addressing missed test concern * further cleanup - Addressed warnings / messages - Simplify cognitive complexity for formatting - Adds `CodeAnalysis` attributes - Updates SonarAnalyzer
* expands smoketests * expands benchmarks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.