Repository navigation
feat: add Build:CSharpierPath to run a vendored CSharpier assembly - #32
Merged
Merged
Conversation
A repository that needs an unreleased CSharpier (for example one that formats C# 15 unions) can point Build:CSharpierPath at a CLI assembly it vendors itself. LintModule then runs 'dotnet <path> check <root>' and bypasses the dotnet-tools.json manifest tool entirely, so no tool restore is required.
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.
Summary
Adds
Build:CSharpierPathso a consuming repository can run a CSharpier CLI assembly it vendors itself instead of thedotnet-tools.jsonmanifest tool.This is needed by repositories whose code contains C# 15
uniondeclarations: the released CSharpier (1.3.0) reports those files as "not formatted due to syntax errors", which fails the Lint module in CI and the pre-commit hook. An unreleased CSharpier build parses them.When
Build:CSharpierPathis set,LintModulerunsdotnet <path> check <repository root>directly and skipsdotnet tool restore/dotnet tool run csharpierentirely. Unset, behaviour is unchanged.Changes
BuildSettings.CSharpierPath(nullable string, unset by default)LintModuleoverride branch (RunCSharpierAsync)appsettings.jsondefault (null)purview-build.schema.json(just schema)docs/wiki/Pipeline-Modules.md,docs/wiki/Configuration-Reference.md,README.mdskills/purview-build-pipelineandskills/purview-build-configurationpackage.json-> 0.6.0Verification
dotnet build src/Build.slnx -c Release --warnaserror- cleanBuild.UnitTests(335) andRepository.UnitTests(9) - passjust config-matrix(21) andjust release-matrix(20) - passjust lint-check- passCSharpierPathset ran the vendored assembly throughLintModule(LintModule Passed, pipeline exit 0).Consumers
purview-dev/changeopspinsbuild-version: 0.6.0and setsBuild:CSharpierPathto its vendored CSharpier. It cannot pass CI until 0.6.0 is published.