Skip to content

Commit

Permalink
Treat all warnings as errors in CI (#177)
Browse files Browse the repository at this point in the history
* Treat all warnings as errors in CI

* Fix RS diagnostics

* Workaround

* Add Comment

---------

Co-authored-by: Brandon Minnick <[email protected]>
  • Loading branch information
Youssef1313 and brminnick authored Jan 28, 2023
1 parent 4bef9a1 commit eb5670e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 66 deletions.
18 changes: 9 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ variables:
PathToCommunityToolkitSampleCsproj: 'samples/CommunityToolkit.Maui.Markup.Sample/CommunityToolkit.Maui.Markup.Sample.csproj'
PathToCommunityToolkitUnitTestCsproj: 'src/CommunityToolkit.Maui.Markup.UnitTests/CommunityToolkit.Maui.Markup.UnitTests.csproj'
PathToCommunityToolkitSourceGeneratorsCsproj: 'src/CommunityToolkit.Maui.Markup.SourceGenerators/CommunityToolkit.Maui.Markup.SourceGenerators.csproj'
XcodeVersion: '14.1.0'
XcodeVersion: '14.2.0'
ShouldCheckDependencies: true

trigger:
Expand Down Expand Up @@ -91,28 +91,28 @@ jobs:
inputs:
solution: '$(PathToCommunityToolkitSourceGeneratorsCsproj)'
configuration: 'Release'
msbuildArgs: '/restore'
msbuildArgs: '/restore /warnaserror'

- task: VSBuild@1
displayName: 'Build CommunityToolkit.Maui.Markup'
inputs:
solution: '$(PathToCommunityToolkitCsproj)'
configuration: 'Release'
msbuildArgs: '/restore'
msbuildArgs: '/restore /warnaserror'

- task: VSBuild@1
displayName: 'Build CommunityToolkit.Maui.Markup.Sample'
inputs:
solution: '$(PathToCommunityToolkitSampleCsproj)'
configuration: 'Release'
msbuildArgs: '/restore'
msbuildArgs: '/restore /warnaserror'

- task: VSBuild@1
displayName: 'Build CommunityToolkit.Maui.Markup.UnitTests'
inputs:
solution: '$(PathToCommunityToolkitUnitTestCsproj)'
configuration: 'Release'
msbuildArgs: '/restore'
msbuildArgs: '/restore /warnaserror'

# test
- task: DotNetCoreCLI@2
Expand Down Expand Up @@ -289,22 +289,22 @@ jobs:
- task: CmdLine@2
displayName: 'Build CommunityToolkit.Maui.Markup.SourceGenerators'
inputs:
script: dotnet build $(PathToCommunityToolkitSourceGeneratorsCsproj) -c Release
script: dotnet build $(PathToCommunityToolkitSourceGeneratorsCsproj) -c Release -warnaserror

- task: CmdLine@2
displayName: 'Build CommunityToolkit.Maui.Markup'
inputs:
script: dotnet build $(PathToCommunityToolkitCsproj) -c Release
script: dotnet build $(PathToCommunityToolkitCsproj) -c Release -warnaserror

- task: CmdLine@2
displayName: 'Build CommunityToolkit.Maui.Markup.Sample'
inputs:
script: dotnet build $(PathToCommunityToolkitSampleCsproj) -c Release
script: dotnet build $(PathToCommunityToolkitSampleCsproj) -c Release -warnaserror

- task: CmdLine@2
displayName: 'Build CommunityToolkit.Maui.Markup.UnitTests'
inputs:
script: dotnet build $(PathToCommunityToolkitSampleCsproj) -c Release
script: dotnet build $(PathToCommunityToolkitSampleCsproj) -c Release -warnaserror

# test
- task: CmdLine@2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,14 @@
<ProjectReference Include="..\..\src\CommunityToolkit.Maui.Markup.SourceGenerators\CommunityToolkit.Maui.Markup.SourceGenerators.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
</ItemGroup>

<!-- Workaround for https://github.com/dotnet/maui/issues/7272 -->
<Target Name="_SetPublishFolderTypeNoneOnDocFileItems" BeforeTargets="_ComputePublishLocation">
<ItemGroup>
<ResolvedFileToPublish
Update="@(ResolvedFileToPublish)"
Condition="'%(ResolvedFileToPublish.Extension)' == '.xml' And '%(ResolvedFileToPublish.PublishFolderType)' == ''"
PublishFolderType="None" />
</ItemGroup>
</Target>

</Project>

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit eb5670e

Please sign in to comment.