diff --git a/.editorconfig b/.editorconfig index 0e13eaa..36d2df5 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,12 +1,11 @@ +# DO NOT EDIT: root convention root = true [*] charset = utf-8 end_of_line = lf -indent_size = 2 -indent_style = space -insert_final_newline = true trim_trailing_whitespace = true +# END DO NOT EDIT [*.json] resharper_comment_typo_highlighting = none @@ -19,10 +18,43 @@ insert_final_newline = false [dotnet-tools.json] insert_final_newline = false -[*.cs] +# DO NOT EDIT: json convention +[*.json] +indent_size = 2 +indent_style = space +# END DO NOT EDIT + +# DO NOT EDIT: md convention +[*.md] +indent_size = 2 +indent_style = space +insert_final_newline = true +# END DO NOT EDIT + +# DO NOT EDIT: ps1 convention +[*.ps1] +indent_size = tab +indent_style = tab +insert_final_newline = true +# END DO NOT EDIT + +# DO NOT EDIT: yaml convention +[*.{yml,yaml}] +indent_size = 2 +indent_style = space +# END DO NOT EDIT + +# DO NOT EDIT: csharp convention +# generated from https://github.com/Faithlife/CodingGuidelines/blob/master/sections/csharp/editorconfig.md +[*.{csproj,props,slnx,targets}] +indent_size = 2 +indent_style = space + +[*.{cs,cshtml,razor}] indent_size = tab indent_style = tab tab_width = 4 +insert_final_newline = true csharp_indent_block_contents = true csharp_indent_braces = false csharp_indent_case_contents = true @@ -122,6 +154,8 @@ dotnet_diagnostic.CA1819.severity = suggestion dotnet_diagnostic.CA1822.severity = suggestion dotnet_diagnostic.CA1826.severity = suggestion dotnet_diagnostic.CA1848.severity = suggestion +dotnet_diagnostic.CA1861.severity = suggestion +dotnet_diagnostic.CA1873.severity = suggestion dotnet_diagnostic.CA2000.severity = none dotnet_diagnostic.CA2227.severity = none dotnet_diagnostic.CA2234.severity = none @@ -204,6 +238,13 @@ dotnet_diagnostic.IDE0161.severity = suggestion dotnet_diagnostic.IDE0170.severity = suggestion dotnet_diagnostic.IDE0180.severity = warning dotnet_diagnostic.IDE0290.severity = suggestion +dotnet_diagnostic.IDE0300.severity = suggestion +dotnet_diagnostic.IDE0301.severity = suggestion +dotnet_diagnostic.IDE0305.severity = suggestion +dotnet_diagnostic.IDE0306.severity = suggestion +dotnet_diagnostic.IDE0370.severity = suggestion +dotnet_diagnostic.IDE0390.severity = suggestion +dotnet_diagnostic.IDE0391.severity = suggestion dotnet_diagnostic.IDE1005.severity = suggestion dotnet_diagnostic.NUnit2045.severity = suggestion dotnet_diagnostic.SA0001.severity = none @@ -373,3 +414,4 @@ resharper_unused_auto_property_accessor_global_highlighting = none resharper_unused_auto_property_accessor_local_highlighting = suggestion resharper_unused_member_global_highlighting = none resharper_unused_member_local_highlighting = suggestion +# END DO NOT EDIT diff --git a/.gitattributes b/.gitattributes index 4092f8f..205ec87 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,5 +1,5 @@ * text=auto eol=lf +# DO NOT EDIT: csharp convention *.cs text diff=csharp -*.csproj text merge=union -*.sln text merge=union +# END DO NOT EDIT diff --git a/.github/conventions.yml b/.github/conventions.yml new file mode 100644 index 0000000..4cd9699 --- /dev/null +++ b/.github/conventions.yml @@ -0,0 +1,11 @@ +conventions: + - path: Faithlife/CodingGuidelines/conventions/dotnet-common + - path: Faithlife/CodingGuidelines/conventions/nuget-config + - path: Faithlife/CodingGuidelines/conventions/gitignore-common + - path: Faithlife/CodingGuidelines/conventions/gitignore-dotnet + - path: Faithlife/CodingGuidelines/conventions/gitignore-ide + - path: Faithlife/CodingGuidelines/conventions/dotnet-common-contributing + - path: Faithlife/CodingGuidelines/conventions/dotnet-common-props + - path: Faithlife/CodingGuidelines/conventions/license-mit + settings: + copyright-holder: Ed Ball diff --git a/.github/lsp.json b/.github/lsp.json new file mode 100644 index 0000000..ff432d6 --- /dev/null +++ b/.github/lsp.json @@ -0,0 +1,19 @@ +{ + "lspServers": { + "csharp": { + "command": "dnx", + "args": [ + "--yes", + "--prerelease", + "roslyn-language-server", + "--", + "--stdio", + "--autoLoadProjects" + ], + "fileExtensions": { + ".cs": "csharp", + ".cshtml": "csharp" + } + } + } +} diff --git a/.github/workflows/apply-repo-conventions.yml b/.github/workflows/apply-repo-conventions.yml new file mode 100644 index 0000000..f2e9f66 --- /dev/null +++ b/.github/workflows/apply-repo-conventions.yml @@ -0,0 +1,40 @@ +name: Apply Repository Conventions + +on: + schedule: + - cron: '31 9 * * 1-5' + workflow_dispatch: + +permissions: {} + +jobs: + apply: + name: Apply + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v6 + with: + token: ${{ secrets.BOT_GITHUB_TOKEN }} + # full history needed for git merge-base in repo-conventions tool + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "ejball-bot" + git config user.email "ejball-bot@users.noreply.github.com" + + - name: Install .NET + uses: actions/setup-dotnet@v5 + + - name: Install APM + uses: microsoft/apm-action@v1 + with: + setup-only: true + + - name: Apply repository conventions + env: + GH_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }} + run: | + dnx -y repo-conventions apply --open-pr \ No newline at end of file diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 3ae7ac3..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,40 +0,0 @@ -name: Build - -on: - push: - branches: [master] - tags-ignore: ['**'] - pull_request: - workflow_dispatch: - -env: - DOTNET_NOLOGO: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - -defaults: - run: - shell: pwsh - -jobs: - build: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, windows-latest, macos-latest] - steps: - - name: Install .NET - uses: actions/setup-dotnet@v3 - - name: Check out code - uses: actions/checkout@v3 - - name: Restore - run: .\build.ps1 restore - - name: Build - run: .\build.ps1 build --skip restore - - name: Test - run: .\build.ps1 test --skip build - - name: Publish - if: runner.os == 'Windows' && github.repository_owner == 'ejball' && github.ref == 'refs/heads/master' - env: - BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }} - NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} - run: .\build.ps1 publish --skip test diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a3ccce9 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,82 @@ +name: Continuous Integration + +on: + push: + branches: [master] + tags-ignore: ['**'] + pull_request: + workflow_dispatch: + +env: + DOTNET_NOLOGO: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + +defaults: + run: + shell: pwsh + +permissions: + contents: write + +jobs: + build-matrix: + name: Build ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + steps: + - name: Check out code + uses: actions/checkout@v6 + - name: Install .NET + uses: actions/setup-dotnet@v5 + - name: Restore + run: ./build.ps1 restore + - name: Build + run: ./build.ps1 build --skip restore + - name: Test + run: ./build.ps1 test --skip build + - name: Package + run: ./build.ps1 package --skip test + - name: Upload packages + if: matrix.os == 'windows-latest' + uses: actions/upload-artifact@v7 + with: + name: nuget-packages + path: release/*.nupkg + if-no-files-found: error + + build: + name: Build + runs-on: ubuntu-latest + needs: build-matrix + if: ${{ always() }} + steps: + - name: Build failed + if: ${{ needs.build-matrix.result != 'success' }} + run: Write-Host "Build failed."; exit 1 + - name: Build succeeded + if: ${{ needs.build-matrix.result == 'success' }} + run: Write-Host "Build succeeded." + + publish: + name: Publish + runs-on: windows-latest + needs: build + if: github.repository_owner == 'ejball' && github.ref == 'refs/heads/master' + steps: + - name: Check out code + uses: actions/checkout@v6 + - name: Install .NET + uses: actions/setup-dotnet@v5 + - name: Download packages + uses: actions/download-artifact@v8 + with: + name: nuget-packages + path: release + - name: Publish + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }} + run: ./build.ps1 publish --skip package --trigger publish-nuget-output diff --git a/.github/workflows/copilot-setup-steps.yml b/.github/workflows/copilot-setup-steps.yml new file mode 100644 index 0000000..a5732dc --- /dev/null +++ b/.github/workflows/copilot-setup-steps.yml @@ -0,0 +1,33 @@ +name: Copilot Setup Steps + +on: + workflow_dispatch: + push: + paths: + - .github/workflows/copilot-setup-steps.yml + pull_request: + paths: + - .github/workflows/copilot-setup-steps.yml + +permissions: + contents: read + +env: + DOTNET_NOLOGO: 1 + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + +defaults: + run: + shell: pwsh + +jobs: + copilot-setup-steps: + name: Copilot Setup Steps + runs-on: ubuntu-latest + steps: + - name: Check out code + uses: actions/checkout@v6 + - name: Install .NET + uses: actions/setup-dotnet@v5 + - name: Restore + run: ./build.ps1 restore diff --git a/.github/workflows/publish-docs.yaml b/.github/workflows/publish-docs.yaml deleted file mode 100644 index f2e15ed..0000000 --- a/.github/workflows/publish-docs.yaml +++ /dev/null @@ -1,21 +0,0 @@ -name: Publish Docs -on: - workflow_dispatch: -env: - DOTNET_NOLOGO: 1 - DOTNET_CLI_TELEMETRY_OPTOUT: 1 -defaults: - run: - shell: pwsh -jobs: - publish-docs: - runs-on: windows-latest - steps: - - name: Install .NET - uses: actions/setup-dotnet@v3 - - name: Check out code - uses: actions/checkout@v3 - - name: Publish Docs - env: - BUILD_BOT_PASSWORD: ${{ secrets.BUILD_BOT_PASSWORD }} - run: .\build.ps1 publish --no-test --trigger publish-docs diff --git a/.gitignore b/.gitignore index a2ad192..7ec75c9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,21 @@ -.vs/ -.idea/ +# DO NOT EDIT: gitignore-common convention +.DS_Store +Thumbs.db +*.log +# END DO NOT EDIT + +# DO NOT EDIT: gitignore-dotnet convention artifacts/ bin/ obj/ release/ +# END DO NOT EDIT +# DO NOT EDIT: gitignore-ide convention +.vs/ +.idea/ *.cache -*.log -*.ncrunchproject -*.ncrunchsolution *.user -launchSettings.json -nCrunchTemp* +*.userprefs _ReSharper* -.DS_Store +# END DO NOT EDIT diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8ab1646..2bf2bb6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,9 +1,19 @@ + + # Contributing ## Publishing -* To publish the library, update the `` in [`Directory.Build.props`](Directory.Build.props), add a corresponding section to the top of [`ReleaseNotes.md`](ReleaseNotes.md), commit, and push. +To publish an official release: + +* Update the `` in [`Directory.Build.props`](Directory.Build.props). +* Add a corresponding section to the top of [`ReleaseNotes.md`](ReleaseNotes.md). +* Push or create a PR for review. + +### Prereleases + +Certain changes can be hard to unit test and are better tested in a real consumer project. In this case, you can publish a beta version of the library for testing. -## Template +To publish a beta, add a `` below `` in [`Directory.Build.props`](Directory.Build.props), e.g., `beta.1`. Publish as above. -* This repository uses the [`faithlife-build`](https://github.com/Faithlife/CSharpTemplate/tree/faithlife-build) template of [`Faithlife/CSharpTemplate`](https://github.com/Faithlife/CSharpTemplate). +When beta testing is done, delete the `` and publish again. diff --git a/CodeGenCore.sln b/CodeGenCore.sln deleted file mode 100644 index 7216b36..0000000 --- a/CodeGenCore.sln +++ /dev/null @@ -1,59 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 17 -VisualStudioVersion = 17.0.31903.59 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeGenCore", "src\CodeGenCore\CodeGenCore.csproj", "{1F75E8CE-F59A-4738-81EC-17B71C125A06}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CodeGenCore.Tests", "tests\CodeGenCore.Tests\CodeGenCore.Tests.csproj", "{3506DA15-B470-42E7-B897-D436451CBC32}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Build", "tools\Build\Build.csproj", "{9BB3C85C-100E-4128-A9AF-8F697D753538}" -EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "XmlDocGen", "tools\XmlDocGen\XmlDocGen.csproj", "{0A5C4B36-610E-4451-BD56-86E5C8A52C42}" -EndProject -Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{A21957E2-3EB8-4CA5-8537-04F60C9F98D5}" - ProjectSection(SolutionItems) = preProject - .editorconfig = .editorconfig - .gitattributes = .gitattributes - .gitignore = .gitignore - build.ps1 = build.ps1 - CONTRIBUTING.md = CONTRIBUTING.md - Directory.Build.props = Directory.Build.props - Directory.Packages.props = Directory.Packages.props - global.json = global.json - LICENSE = LICENSE - nuget.config = nuget.config - README.md = README.md - ReleaseNotes.md = ReleaseNotes.md - EndProjectSection -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {1F75E8CE-F59A-4738-81EC-17B71C125A06}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {1F75E8CE-F59A-4738-81EC-17B71C125A06}.Debug|Any CPU.Build.0 = Debug|Any CPU - {1F75E8CE-F59A-4738-81EC-17B71C125A06}.Release|Any CPU.ActiveCfg = Release|Any CPU - {1F75E8CE-F59A-4738-81EC-17B71C125A06}.Release|Any CPU.Build.0 = Release|Any CPU - {3506DA15-B470-42E7-B897-D436451CBC32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {3506DA15-B470-42E7-B897-D436451CBC32}.Debug|Any CPU.Build.0 = Debug|Any CPU - {3506DA15-B470-42E7-B897-D436451CBC32}.Release|Any CPU.ActiveCfg = Release|Any CPU - {3506DA15-B470-42E7-B897-D436451CBC32}.Release|Any CPU.Build.0 = Release|Any CPU - {9BB3C85C-100E-4128-A9AF-8F697D753538}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {9BB3C85C-100E-4128-A9AF-8F697D753538}.Debug|Any CPU.Build.0 = Debug|Any CPU - {9BB3C85C-100E-4128-A9AF-8F697D753538}.Release|Any CPU.ActiveCfg = Release|Any CPU - {9BB3C85C-100E-4128-A9AF-8F697D753538}.Release|Any CPU.Build.0 = Release|Any CPU - {0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0A5C4B36-610E-4451-BD56-86E5C8A52C42}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection - GlobalSection(ExtensibilityGlobals) = postSolution - SolutionGuid = {28CD7BF1-0965-4088-8597-4C08C20C814C} - EndGlobalSection -EndGlobal diff --git a/CodeGenCore.sln.DotSettings b/CodeGenCore.sln.DotSettings deleted file mode 100644 index 6f09a21..0000000 --- a/CodeGenCore.sln.DotSettings +++ /dev/null @@ -1,2 +0,0 @@ - - <?xml version="1.0" encoding="utf-16"?><Profile name="Build"><XAMLCollapseEmptyTags>False</XAMLCollapseEmptyTags><CppClangTidyCleanupDescriptor /><CSCodeStyleAttributes ArrangeTypeAccessModifier="True" ArrangeTypeMemberAccessModifier="True" SortModifiers="True" RemoveRedundantParentheses="True" AddMissingParentheses="False" ArrangeBraces="False" ArrangeAttributes="False" ArrangeArgumentsStyle="False" ArrangeCodeBodyStyle="False" ArrangeVarStyle="True" ArrangeTrailingCommas="True" /><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSReformatCode>True</CSReformatCode><CSArrangeQualifiers>True</CSArrangeQualifiers><CSFixBuiltinTypeReferences>True</CSFixBuiltinTypeReferences><CSShortenReferences>True</CSShortenReferences><CSMakeFieldReadonly>True</CSMakeFieldReadonly><CSMakeAutoPropertyGetOnly>True</CSMakeAutoPropertyGetOnly></Profile> diff --git a/CodeGenCore.slnx b/CodeGenCore.slnx new file mode 100644 index 0000000..a2b3c99 --- /dev/null +++ b/CodeGenCore.slnx @@ -0,0 +1,6 @@ + + + + + + diff --git a/Directory.Build.props b/Directory.Build.props index bd09cff..ad947cd 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,25 +1,28 @@ - 0.3.1 + 0.3.2 0.3.1 - 12.0 + $(NoWarn);1998;NU1507;NU5105 + ejball + CodeGenCore + MIT + Ed Ball + + + + + 14.0 enable enable true - $(NoWarn);1998;NU1507;NU5105 en-US embedded - ejball - CodeGenCore - MIT - https://ejball.com/$(RepositoryName) - https://github.com/$(GitHubOrganization)/$(RepositoryName)/blob/master/ReleaseNotes.md + https://github.com/$(GitHubOrganization)/$(RepositoryName) + https://github.com/$(GitHubOrganization)/$(RepositoryName)/blob/master/ReleaseNotes.md https://github.com/$(GitHubOrganization)/$(RepositoryName).git - Ed Ball + $(GitHubOrganization) Copyright $(Authors) - true - true true latest-all true @@ -31,11 +34,10 @@ true true true + true + all + low - - - $(VersionPrefix).$(BuildNumber) - true - + diff --git a/Directory.Packages.props b/Directory.Packages.props index 5b5074e..3484ce0 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -1,19 +1,27 @@ + true + true + true + - + - - - - \ No newline at end of file + + + + + + + + diff --git a/LICENSE b/LICENSE index df586e7..f1491c9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright 2024 Ed Ball +Copyright 2026 Ed Ball Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index c38dfb1..4c2c70c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # CodeGenCore -CodeGenCore class library. +[![NuGet](https://img.shields.io/nuget/v/CodeGenCore.svg)](https://www.nuget.org/packages/CodeGenCore) -[![Build](https://github.com/ejball/CodeGenCore/workflows/Build/badge.svg)](https://github.com/ejball/CodeGenCore/actions?query=workflow%3ABuild) [![NuGet](https://img.shields.io/nuget/v/CodeGenCore.svg)](https://www.nuget.org/packages/CodeGenCore) +## Usage -[Documentation](https://ejball.com/CodeGenCore/) | [Release Notes](https://github.com/ejball/CodeGenCore/blob/master/ReleaseNotes.md) | [Contributing](https://github.com/ejball/CodeGenCore/blob/master/CONTRIBUTING.md) +See the [source code](./src/CodeGenCore). diff --git a/ReleaseNotes.md b/ReleaseNotes.md index 89678d1..170ece1 100644 --- a/ReleaseNotes.md +++ b/ReleaseNotes.md @@ -1,5 +1,10 @@ # Release Notes +## 0.3.2 + +* Update build and repository conventions. +* Update Scriban dependency. + ## 0.3.1 * Fix non-snake-case for nested members. @@ -17,3 +22,4 @@ ## 0.1.0 * Initial release. + diff --git a/build.ps1 b/build.ps1 index 9b32821..b11b95c 100755 --- a/build.ps1 +++ b/build.ps1 @@ -1,12 +1,13 @@ #!/usr/bin/env pwsh +# DO NOT EDIT: generated by https://github.com/Faithlife/CodingGuidelines/tree/master/conventions/build-script $ErrorActionPreference = 'Stop' Push-Location $PSScriptRoot try { - dotnet publish ./tools/Build/Build.csproj --artifacts-path ./artifacts --nologo --verbosity quiet - if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } - dotnet ./artifacts/publish/Build/release/Build.dll $args - if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + dotnet publish ./tools/Build/Build.csproj --artifacts-path ./artifacts --nologo --verbosity quiet -tl:off + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } + dotnet ./artifacts/publish/Build/release/Build.dll $args + if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } } finally { - Pop-Location + Pop-Location } diff --git a/global.json b/global.json index 391ba3c..512142d 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "8.0.100", + "version": "10.0.100", "rollForward": "latestFeature" } } diff --git a/nuget.config b/nuget.config index 6873eb9..da2f86d 100644 --- a/nuget.config +++ b/nuget.config @@ -1,6 +1,6 @@ - + - + diff --git a/src/CodeGenCore/CodeGenCore.csproj b/src/CodeGenCore/CodeGenCore.csproj index 6c9803e..2ad040b 100644 --- a/src/CodeGenCore/CodeGenCore.csproj +++ b/src/CodeGenCore/CodeGenCore.csproj @@ -7,6 +7,7 @@ true true README.md + true diff --git a/src/CodeGenCore/CodeGenGlobals.cs b/src/CodeGenCore/CodeGenGlobals.cs index 11709c4..7fc28d1 100644 --- a/src/CodeGenCore/CodeGenGlobals.cs +++ b/src/CodeGenCore/CodeGenGlobals.cs @@ -31,10 +31,9 @@ internal ScriptObject CreateScriptObject(CodeGenSettings? settings) member: useSnakeCase ? StandardMemberRenamer.Rename(name) : name, function: methodInfo.CreateDelegate( Expression.GetDelegateType( - methodInfo.GetParameters() + [.. methodInfo.GetParameters() .Select(parameter => parameter.ParameterType) - .Append(methodInfo.ReturnType) - .ToArray()), + .Append(methodInfo.ReturnType)]), target: methodInfo.IsStatic ? null : m_source)); } diff --git a/tests/CodeGenCore.Tests/CodeGenTemplateTests.cs b/tests/CodeGenCore.Tests/CodeGenTemplateTests.cs index 7905baf..45d1359 100644 --- a/tests/CodeGenCore.Tests/CodeGenTemplateTests.cs +++ b/tests/CodeGenCore.Tests/CodeGenTemplateTests.cs @@ -124,7 +124,7 @@ public void SingleFileName() template.Generate(settings: new CodeGenSettings { NewLine = "\n", SingleFileName = "single.txt" }).Should().Equal(new CodeGenOutputFile("single.txt", "before\n==> a.txt\nafter\n")); } - public sealed class Globals + internal sealed class Globals { public int Number => 42; diff --git a/tools/Build/Build.cs b/tools/Build/Build.cs index b7d00b2..7bb52c2 100644 --- a/tools/Build/Build.cs +++ b/tools/Build/Build.cs @@ -1,23 +1,7 @@ -return BuildRunner.Execute(args, build => -{ - var gitLogin = new GitLoginInfo("faithlifebuildbot", Environment.GetEnvironmentVariable("BUILD_BOT_PASSWORD") ?? ""); - - build.AddDotNetTargets( +return BuildRunner.Execute(args, + build => build.AddDotNetTargets( new DotNetBuildSettings { NuGetApiKey = Environment.GetEnvironmentVariable("NUGET_API_KEY"), - DocsSettings = new DotNetDocsSettings - { - GitLogin = gitLogin, - GitAuthor = new GitAuthorInfo("ejball", "ejball@gmail.com"), - SourceCodeUrl = "https://github.com/ejball/CodeGenCore/tree/master/src", - GitBranchName = "docs", - TargetDirectory = "", - }, - PackageSettings = new DotNetPackageSettings - { - GitLogin = gitLogin, - PushTagOnPublish = x => $"v{x.Version}", - }, - }); -}); + PackageSettings = new DotNetPackageSettings { PushTagOnPublish = x => $"v{x.Version}" }, + })); diff --git a/tools/Build/Build.csproj b/tools/Build/Build.csproj index 94c9978..dee0ca1 100644 --- a/tools/Build/Build.csproj +++ b/tools/Build/Build.csproj @@ -2,7 +2,7 @@ Exe - net8.0 + net10.0 diff --git a/tools/XmlDocGen/XmlDocGen.csproj b/tools/XmlDocGen/XmlDocGen.csproj deleted file mode 100644 index 2cf8692..0000000 --- a/tools/XmlDocGen/XmlDocGen.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - Exe - net8.0 - - - - - - - - - - - diff --git a/tools/XmlDocGen/XmlDocGenApp.cs b/tools/XmlDocGen/XmlDocGenApp.cs deleted file mode 100644 index 893a7df..0000000 --- a/tools/XmlDocGen/XmlDocGenApp.cs +++ /dev/null @@ -1,3 +0,0 @@ -using XmlDocMarkdown.Core; - -return XmlDocMarkdownApp.Run(args);