Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings in HighPerformance/Mvvm unit tests #4142

Merged
2 commits merged into from
Aug 4, 2021

Conversation

Sergio0694
Copy link
Member

Fixes #4102 (comment)

PR Type

What kind of change does this PR introduce?

  • Maintenance

What is the current behavior?

Some HighPerformance/Mvvm unit tests produce warnings when the projects are built.

What is the new behavior?

No more warnings 🙌

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tested code with current supported SDKs
  • Pull Request has been submitted to the documentation repository instructions. Link:
  • Sample in sample app has been added / updated (for bug fixes / features)
  • New major technical changes in the toolkit have or will be added to the Wiki e.g. build changes, source generators, testing infrastructure, sample creation changes, etc...
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Header has been added to all new source files (run build/UpdateHeaders.bat)
  • Contains NO breaking changes

@ghost
Copy link

ghost commented Jul 29, 2021

Thanks Sergio0694 for opening a Pull Request! The reviewers will test the PR and highlight if there is any conflict or changes required. If the PR is approved we will proceed to merge the pull request 🙌

@ghost ghost requested review from michael-hawker, azchohfi and Rosuavio July 29, 2021 10:20
@ghost ghost added feature request 📬 A request for new changes to improve functionality improvements ✨ priority 🚩 labels Jul 29, 2021
@Sergio0694 Sergio0694 mentioned this pull request Jul 29, 2021
8 tasks
@Sergio0694 Sergio0694 removed feature request 📬 A request for new changes to improve functionality improvements ✨ labels Jul 29, 2021
@michael-hawker
Copy link
Member

Cool want to fix the source generator ones too?


D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ICommandGenerator\UnitTests.Mvvm.Test_ICommandAttribute.MyViewModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.IMessengerRegisterAllGenerator\UnitTests.Mvvm.Test_IRecipientGenerator.RecipientWithSomeMessages.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.IMessengerRegisterAllGenerator\UnitTests.Mvvm.Test_Messenger.RecipientWithSomeMessages.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.INotifyPropertyChangedGenerator\UnitTests.Mvvm.Test_INotifyPropertyChangedAttribute.SampleModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.INotifyPropertyChangedGenerator\UnitTests.Mvvm.Test_INotifyPropertyChangedAttribute.SampleModelWithoutHelpers.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.INotifyPropertyChangedGenerator\UnitTests.Mvvm.Test_ObservablePropertyAttribute.DependentPropertyModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\UnitTests.Mvvm.Test_ObservableObjectAttribute.SampleModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableObjectGenerator\UnitTests.Mvvm.Test_ObservableObjectAttribute.SampleModelSealed.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\UnitTests.Mvvm.Test_ObservablePropertyAttribute.SampleModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\UnitTests.Mvvm.Test_ObservablePropertyAttribute.DependentPropertyModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\UnitTests.Mvvm.Test_ObservablePropertyAttribute.MyFormViewModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservablePropertyGenerator\__KnownINotifyPropertyChangedOrChangingArgs.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableRecipientGenerator\UnitTests.Mvvm.Test_ObservableRecipientAttribute.Person.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableRecipientGenerator\UnitTests.Mvvm.Test_ObservableRecipientAttribute.AbstractPerson.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableRecipientGenerator\UnitTests.Mvvm.Test_ObservableRecipientAttribute.NonAbstractPerson.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservablePropertyAttribute.MyFormViewModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservableRecipientAttribute.Person.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservableValidator.Person.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservableValidator.PersonWithDeferredValidation.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservableValidator.ComparableModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservableValidator.CustomValidationModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservableValidator.ValidationWithServiceModel.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]
         D:\a\1\s\UnitTests\UnitTests.NetCore\Microsoft.Toolkit.Mvvm.SourceGenerators\Microsoft.Toolkit.Mvvm.SourceGenerators.ObservableValidatorValidateAllPropertiesGenerator\UnitTests.Mvvm.Test_ObservableValidator.ValidationWithDisplayName.cs(1,1): warning SA1633: The file header XML is invalid. [D:\a\1\s\UnitTests\UnitTests.NetCore\UnitTests.NetCore.csproj]

@Sergio0694
Copy link
Member Author

Sergio0694 commented Jul 29, 2021

@michael-hawker I've re-run the .bat script to update headers and that didn't do anything. And the headers look fine to me too. This is kinda making me wonder whether it might be some weird result of the changes in #3896 where the BOM at the start of the files was removed, and whether that's somehow causing that warning in StyleCop. At the very least, the fact that running the script isn't fixing anything confirms that we don't really have the infrastructure in place to maintain those whitespace updates in those PRs I fear 😥

EDIT: mmh wait on second though those seem to just be generated files, which shouldn't really be inspected by StyleCop at all? They also have #pragma warning disable but it seems like it's not being respected? Will take a look 🤔

@Sergio0694 Sergio0694 force-pushed the maintenance/unit-test-warnings branch from 16218eb to 6b03f8a Compare July 30, 2021 00:17
@ghost
Copy link

ghost commented Aug 4, 2021

Hello @RosarioPulella!

Because this pull request has the auto merge :zap: label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 16d2886 into CommunityToolkit:main Aug 4, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants