diff --git a/.editorconfig b/.editorconfig index 26a8ca5..4cab270 100644 --- a/.editorconfig +++ b/.editorconfig @@ -58,6 +58,12 @@ dotnet_style_require_accessibility_modifiers = omit_if_default:error dotnet_diagnostic.IDE0040.severity = error [*.cs] +# Top-level files are definitely OK +csharp_using_directive_placement = outside_namespace:silent +csharp_style_namespace_declarations = block_scoped:silent +csharp_prefer_simple_using_statement = true:suggestion +csharp_prefer_braces = true:silent + # Prefer "var" everywhere csharp_style_var_for_built_in_types = true:suggestion csharp_style_var_when_type_is_apparent = true:suggestion @@ -89,9 +95,15 @@ csharp_new_line_before_members_in_object_initializers = true csharp_new_line_before_members_in_anonymous_types = true # Test settings -[**/*Tests*/*{.cs,.vb}] +[**/*Tests*/**{.cs,.vb}] # xUnit1013: Public method should be marked as test. Allows using records as test classes dotnet_diagnostic.xUnit1013.severity = none +# CS9113: Parameter is unread (usually, ITestOutputHelper) +dotnet_diagnostic.CS9113.severity = none + +# Default severity for analyzer diagnostics with category 'Style' +dotnet_analyzer_diagnostic.category-Style.severity = none + # VSTHRD200: Use "Async" suffix for async methods dotnet_diagnostic.VSTHRD200.severity = none diff --git a/.github/dependabot.yml b/.github/dependabot.yml index f551596..ed06dbe 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -7,3 +7,34 @@ updates: directory: / schedule: interval: daily + groups: + Azure: + patterns: + - "Azure*" + - "Microsoft.Azure*" + Identity: + patterns: + - "System.IdentityModel*" + - "Microsoft.IdentityModel*" + System: + patterns: + - "System*" + exclude-patterns: + - "System.IdentityModel*" + Extensions: + patterns: + - "Microsoft.Extensions*" + Web: + patterns: + - "Microsoft.AspNetCore*" + Tests: + patterns: + - "Microsoft.NET.Tests*" + - "xunit*" + - "coverlet*" + ThisAssembly: + patterns: + - "ThisAssembly*" + ProtoBuf: + patterns: + - "protobuf-*" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0781a30..0480456 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -17,6 +17,8 @@ on: env: DOTNET_NOLOGO: true + VersionPrefix: 42.42.${{ github.run_number }} + VersionLabel: ${{ github.ref }} defaults: run: @@ -54,7 +56,7 @@ jobs: fetch-depth: 0 - name: 🙏 build - run: dotnet build -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" + run: dotnet build -m:1 - name: ⚙ GNU grep if: matrix.os == 'macOS-latest' @@ -66,7 +68,7 @@ jobs: uses: ./.github/workflows/test - name: 📦 pack - run: dotnet pack -m:1 -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" + run: dotnet pack -m:1 # Only push CI package to sleet feed if building on ubuntu (fastest) - name: 🚀 sleet @@ -79,7 +81,6 @@ jobs: dotnet-format: runs-on: ubuntu-latest - needs: build steps: - name: 🤘 checkout uses: actions/checkout@v2 @@ -88,4 +89,6 @@ jobs: fetch-depth: 0 - name: ✓ ensure format - run: dotnet format --verify-no-changes -v:diag --exclude ~/.nuget + run: | + dotnet format whitespace --verify-no-changes -v:diag --exclude ~/.nuget + dotnet format style --verify-no-changes -v:diag --exclude ~/.nuget diff --git a/.github/workflows/includes.yml b/.github/workflows/includes.yml index b806653..bb1a90b 100644 --- a/.github/workflows/includes.yml +++ b/.github/workflows/includes.yml @@ -26,7 +26,7 @@ jobs: token: ${{ env.GH_TOKEN }} - name: +Mᐁ includes - uses: devlooped/actions-include@v1 + uses: devlooped/actions-includes@v1 - name: ✍ pull request uses: peter-evans/create-pull-request@v4 diff --git a/.gitignore b/.gitignore index 242945b..a438e35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,13 @@ bin +app obj artifacts pack TestResults .vs .vscode +.idea +local.settings.json *.suo *.sdf @@ -29,5 +32,6 @@ node_modules _site .jekyll-metadata .jekyll-cache +.sass-cache Gemfile.lock package-lock.json diff --git a/.netconfig b/.netconfig index bb56a4b..70f4631 100644 --- a/.netconfig +++ b/.netconfig @@ -21,9 +21,9 @@ skip [file ".editorconfig"] url = https://github.com/devlooped/oss/blob/main/.editorconfig - etag = 897634b9ba05c00e8ef35b24533d31bc43a5299be5a64e240109ba4c00fcad15 + etag = 7298c6450967975a8782b5c74f3071e1910fc59686e48f9c9d5cd7c68213cf59 weak - sha = 448cf45a26e068fe5d7164ea48d1dc8bf620df46 + sha = c779d3d4e468358106dea03e93ba2cd35bb01ecb [file ".gitattributes"] url = https://github.com/devlooped/oss/blob/main/.gitattributes etag = 7acb32f5fa6d4ccd9c824605a7c2b8538497f0068c165567807d393dcf4d6bb7 @@ -31,19 +31,19 @@ sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file ".github/dependabot.yml"] url = https://github.com/devlooped/oss/blob/main/.github/dependabot.yml - etag = 35f2134fff3b0235ff8dac8618a76198c8ef533ad2f29628bbb435cd1134d638 + etag = f8080f8f04d87529e90d9a66751d304a7141196fb9734aa2d110784e52e66898 weak - sha = 4f070a477b4162a280f02722ae666376ae4fcc71 + sha = 35ca3f3405452465058d89005f8a88a65847c377 [file ".github/workflows/build.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/build.yml - etag = bea8f881a2c7a02de70a201806edb432f7185d39df762f76efdefe392ea019a5 + etag = c616df0877fba60002ccfc0397e9f731ddb22acbbb195a0598fedd4cac5f3135 weak - sha = 7e3288c3c7746354edc2836e4fb71f11e17db83c + sha = 13d67e2cf3f786c8189364fd29332aaa7dc575dc [file ".gitignore"] url = https://github.com/devlooped/oss/blob/main/.gitignore - etag = 1c1705a3f0ed65e33c9133996ebaa100aa445a8b968b2904ad48fef938702006 + etag = f11dcc8c057bd2f526aa9c7090c9568d1656fafaaedc6719da42a00283018ffa weak - sha = c78868eba59a3e04602434684f9eac241fef13fb + sha = 4bd702593c10df189cd4a0f6e6fb72e55de02198 [file "Directory.Build.rsp"] url = https://github.com/devlooped/oss/blob/main/Directory.Build.rsp etag = 6a6c6e1d3895df953abf14c82b0899e3eea75cdcd679f6212dcfea15183d73d6 @@ -66,14 +66,14 @@ sha = 0683ee777d7d878d4bf013d7deea352685135a05 [file "src/Directory.Build.props"] url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.props - etag = 1d5ec6bdb8b12c13635a11364dcfe54aefb82cc171f332a8d536aa35476222d5 + etag = e9fd8ef4740d5559fa495580b04ec3437b99edbfb8452813907337f9374c1282 weak - sha = ef8e7fa7593ded91d871d30eeebd0dc79f679159 + sha = 1bf1eacc7ac3920d52c8e7045bfa34abc7c05302 [file "src/Directory.Build.targets"] url = https://github.com/devlooped/oss/blob/main/src/Directory.Build.targets - etag = a495854b35fb101774cdfd2b2c2875ed3dd85ada5d04cbdd3b7a90c9afdbe36f + etag = 7cb1421f00d9f6f4c00f0ca98e485dcadb927cfa6b3f0b5d4fb212525d2ce9c0 weak - sha = 96b67734de9897ae5fb99f3b87c7042e6ccd218b + sha = 1bf1eacc7ac3920d52c8e7045bfa34abc7c05302 [file "src/kzu.snk"] url = https://github.com/devlooped/oss/blob/main/src/kzu.snk etag = b8d789b5b6bea017cdcc8badcea888ad78de3e34298efca922054e9fb0e7b6b9 @@ -111,8 +111,8 @@ weak [file ".github/workflows/includes.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/includes.yml - sha = f08c3f28e46e28eb31e70846d65e57aa9553ce56 - etag = 884175b3f80b39edc1a23c6a34d58aa3c481432d4f20938f9a834dd918ef283d + sha = ac753b791d03997eb655efb26ae141b51addd1c0 + etag = fcd94a08ac9ebc0e8351deac4e7f085cf8ef67816cc50006e068f44166096eb8 weak [file ".github/workflows/sponsor.yml"] url = https://github.com/devlooped/oss/blob/main/.github/workflows/sponsor.yml diff --git a/readme.md b/readme.md index 551f97c..e484254 100644 --- a/readme.md +++ b/readme.md @@ -180,13 +180,45 @@ Note that at the visitor level, both hierarchies are treated uniformly, since th [![Clarius Org](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/clarius.png "Clarius Org")](https://github.com/clarius) -[![Christian Findlay](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MelbourneDeveloper.png "Christian Findlay")](https://github.com/MelbourneDeveloper) -[![C. Augusto Proiete](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/augustoproiete.png "C. Augusto Proiete")](https://github.com/augustoproiete) [![Kirill Osenkov](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KirillOsenkov.png "Kirill Osenkov")](https://github.com/KirillOsenkov) [![MFB Technologies, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MFB-Technologies-Inc.png "MFB Technologies, Inc.")](https://github.com/MFB-Technologies-Inc) -[![SandRock](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sandrock.png "SandRock")](https://github.com/sandrock) -[![Eric C](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eeseewy.png "Eric C")](https://github.com/eeseewy) -[![Andy Gocke](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agocke.png "Andy Gocke")](https://github.com/agocke) +[![Stephen Shaw](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/decriptor.png "Stephen Shaw")](https://github.com/decriptor) +[![Torutek](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/torutek-gh.png "Torutek")](https://github.com/torutek-gh) +[![DRIVE.NET, Inc.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/drivenet.png "DRIVE.NET, Inc.")](https://github.com/drivenet) +[![Daniel Gnägi](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/dgnaegi.png "Daniel Gnägi")](https://github.com/dgnaegi) +[![Ashley Medway](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/AshleyMedway.png "Ashley Medway")](https://github.com/AshleyMedway) +[![Keith Pickford](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Keflon.png "Keith Pickford")](https://github.com/Keflon) +[![Thomas Bolon](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tbolon.png "Thomas Bolon")](https://github.com/tbolon) +[![Kori Francis](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/kfrancis.png "Kori Francis")](https://github.com/kfrancis) +[![Toni Wenzel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/twenzel.png "Toni Wenzel")](https://github.com/twenzel) +[![Giorgi Dalakishvili](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Giorgi.png "Giorgi Dalakishvili")](https://github.com/Giorgi) +[![Mike James](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MikeCodesDotNET.png "Mike James")](https://github.com/MikeCodesDotNET) +[![Dan Siegel](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/dansiegel.png "Dan Siegel")](https://github.com/dansiegel) +[![Reuben Swartz](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/rbnswartz.png "Reuben Swartz")](https://github.com/rbnswartz) +[![Jacob Foshee](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jfoshee.png "Jacob Foshee")](https://github.com/jfoshee) +[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Mrxx99.png "")](https://github.com/Mrxx99) +[![Eric Johnson](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/eajhnsn1.png "Eric Johnson")](https://github.com/eajhnsn1) +[![Norman Mackay](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/mackayn.png "Norman Mackay")](https://github.com/mackayn) +[![Certify The Web](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/certifytheweb.png "Certify The Web")](https://github.com/certifytheweb) +[![Rich Lee](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/richlee.png "Rich Lee")](https://github.com/richlee) +[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/nietras.png "")](https://github.com/nietras) +[![Ix Technologies B.V.](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/IxTechnologies.png "Ix Technologies B.V.")](https://github.com/IxTechnologies) +[![David JENNI](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/davidjenni.png "David JENNI")](https://github.com/davidjenni) +[![Jonathan ](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/Jonathan-Hickey.png "Jonathan ")](https://github.com/Jonathan-Hickey) +[![Oleg Kyrylchuk](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/okyrylchuk.png "Oleg Kyrylchuk")](https://github.com/okyrylchuk) +[![Mariusz Kogut](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/MariuszKogut.png "Mariusz Kogut")](https://github.com/MariuszKogut) +[![Charley Wu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/akunzai.png "Charley Wu")](https://github.com/akunzai) +[![Jakob Tikjøb Andersen](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/jakobt.png "Jakob Tikjøb Andersen")](https://github.com/jakobt) +[![Seann Alexander](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/seanalexander.png "Seann Alexander")](https://github.com/seanalexander) +[![Tino Hager](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/tinohager.png "Tino Hager")](https://github.com/tinohager) +[![Mark Seemann](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/ploeh.png "Mark Seemann")](https://github.com/ploeh) +[![Angelo Belchior](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/angelobelchior.png "Angelo Belchior")](https://github.com/angelobelchior) +[![Blauhaus Technology (Pty) Ltd](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/BlauhausTechnology.png "Blauhaus Technology (Pty) Ltd")](https://github.com/BlauhausTechnology) +[![Ken Bonny](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/KenBonny.png "Ken Bonny")](https://github.com/KenBonny) +[![Simon Cropp](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/SimonCropp.png "Simon Cropp")](https://github.com/SimonCropp) +[![agileworks-eu](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/agileworks-eu.png "agileworks-eu")](https://github.com/agileworks-eu) +[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/sorahex.png "")](https://github.com/sorahex) +[![](https://raw.githubusercontent.com/devlooped/sponsors/main/.github/avatars/wjgthb.png "")](https://github.com/wjgthb) diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 028c354..4527560 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -26,10 +26,10 @@ icon.png - readme.md + readme.md icon.png - readme.md + readme.md true true @@ -112,7 +112,7 @@ after the fixed prefix. This allows dogfooding a branch build. The suffix is sanitized and optionally turned into --> - 42.42.42 + 42.42.42 @@ -142,4 +142,5 @@ + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets index 6150d00..0cb1e4e 100644 --- a/src/Directory.Build.targets +++ b/src/Directory.Build.targets @@ -35,16 +35,16 @@ + Condition="'$(PackReadme)' != 'false' and '$(PackageReadmeFile)' != ''" /> + Condition="Exists('$(MSBuildThisFileDirectory)icon.png') and !Exists('$(MSBuildProjectDirectory)\icon.png')" /> + Condition="'$(PackReadme)' != 'false' and Exists('$(MSBuildThisFileDirectory)readme.md') and !Exists('$(MSBuildProjectDirectory)\readme.md')" /> + PrepareResources;$(CoreCompileDependsOn) + + + + + MSBuild:Compile + $(IntermediateOutputPath)\$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.'))%(Filename).g$(DefaultLanguageSourceExtension) + $(Language) + $(RootNamespace) + $(RootNamespace).$([MSBuild]::ValueOrDefault('%(RelativeDir)', '').Replace('\', '.').Replace('/', '.').TrimEnd('.')) + %(Filename) + @@ -159,5 +173,6 @@ +