Added analyzer support for command line library with initial basic analysis and testing.#24
Merged
smaillet merged 1 commit intoUbiquityDotNET:developfrom Jan 15, 2026
Merged
Conversation
* Renamed `EnumerableObjectComparer` => `SequenceComparer` and added generic type param for items.
* Re-worked standard test support for generators to better match patterns/style of analyzer tests.
- Removed need for Basic assembly package
- Added `CachedSourceGeneratorTest<TGenerator, TVerifier>` to handle common cached validation.
* Added location retrieval extension for `AttributeData` to allow getting the location of the attribute itself for reporting diagnostic associated with the attribute.
* Reduced language runtime minimums to C# 12/.NET 8.0
* Renamed `SourceGeneratorTest<TSourceGenerator, TVerifier>` as `LanguageVerionsSourceGeneratorTest<TSourceGenerator, TVerifier>`
- The new name better describes use, it is intended as a base class for some other type, particularly the new
`CachedSourceGeneratorTest<TGenerator, TVerifier>`
* Added extensions for C# `LanguageVersion` to get default runtime assemblies and nullability behavior etc.. based on language version.
* Converted all test extensions to use `IVerifier`
- This makes the `Ubiquity.NET.SourceGenerator.Test.Utils` independent of the actual test framework so it should be more useful
- Add MsTestVerifier to the UT itself so that there is an adapter that interacts with the MS Test framework of those libraries.
- The `DefaultVerifier` implementation cheats and uses an `InvalidOperationException` for all cases and doesn't actually adapt to anything.
* Removed support for VB
- Inclusion of VB support or any other language causes problems with [RS1038](https://github.com/dotnet/roslyn/blob/main/docs/roslyn-analyzers/rules/RS1038.md)
- If per language support is really desired then the language specific support needs isolation to distinct libraries.
* Added `AttributeDataExtensions.GetLocation()` to get the location of an attribute.
* Renamed `x64.runsettings` to simply `.runsettings`
- Apparently something changed in the IDE and it now requires that name.
Test Results 8 files ± 0 8 suites ±0 1m 10s ⏱️ + 1m 4s Results for commit a630867. ± Comparison against base commit 0243ab3. This pull request removes 1 and adds 12 tests. Note that renamed tests count towards both. |
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.
Added analyzer support with initial basic analysis and testing.
Renamed
EnumerableObjectComparer=>SequenceComparerand added generic type param for items.Re-worked standard test support for generators to better match patterns/style of analyzer tests.
CachedSourceGeneratorTest<TGenerator, TVerifier>to handle common cached validation.Added location retrieval extension for
AttributeDatato allow getting the location of the attribute itself for reporting diagnostic associated with the attribute.Reduced language runtime minimums to C# 12/.NET 8.0
Renamed
SourceGeneratorTest<TSourceGenerator, TVerifier>asLanguageVerionsSourceGeneratorTest<TSourceGenerator, TVerifier>CachedSourceGeneratorTest<TGenerator, TVerifier>Added extensions for C#
LanguageVersionto get default runtime assemblies and nullability behavior etc.. based on language version.Converted all test extensions to use
IVerifierUbiquity.NET.SourceGenerator.Test.Utilsindependent of the actual test framework so it should be more usefulDefaultVerifierimplementation cheats and uses anInvalidOperationExceptionfor all cases and doesn't actually adapt to anything.Removed support for VB
Added
AttributeDataExtensions.GetLocation()to get the location of an attribute.Renamed
x64.runsettingsto simply.runsettings