* Add ValidateMemberAttribute, analyzer and test
* Use attribute on DirtyFields methods
* Defer member lookup
* Additional test case
* Add support for collection types
* Poke tests
* Revert "Add support for collection types"
This reverts commit 2b8f5534bd.
* break, not continue
* Cheaper attribute check with AttributeHelper
* Clean up unused helper method
---------
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
* Add Prototype analyzer
* Add Prototype fixer
* Early return after finding prototype attribute
* Add PrototypeEndsWithPrototypeRule diagnostic
* Oops. Uncomment parallelizable.
* Rework to ignore redundancy for non-literal string values
* Allow redundancy when removal would expose class name not ending in "Prototype"
* Promote PrototypeEndsWithPrototypeRule from warning to error, since it causes a runtime error.
* No need to get the symbol to get the class identifier
* Minor cleanup
* A little more cleanup
* More specific location for redundant name
* Refactor redundant name fixer so argument order is no longer important
* Add failing test
* Use symbol analysis to fix alias handling
* Oops! We have to go back to the previous syntax-based approach.
Now it's a hybrid.
Also fixed tests to not copy the prototype definitions.
---------
Co-authored-by: PJB3005 <pieterjan.briers+git@gmail.com>
Robust.UnitTesting was both ALL tests for RT, and also API surface for content tests.
Tests are now split into separate projects as appropriate, and the API side has also been split off.
* feat: add analyzer for AfterAutoHandleStateEvent
* fix: correct TestOf attribute
Oopsieeeee.
Also weird newline plus unused import.
* Rerun content tests
* refactor: use ==, not .Contains
* feat: make AttributeHelper.HasAttribute looser
* refactor: use AttributeHelper.HasAttribute
* perf: cache AutoGenStateAttribute's type
* refactor: more pattern matching
ElementAtOrDefault with constant arg is bad; just use positional
matching.
This allows us to make it obsolete to *inherit* from a class, and only that.
Intended so people stop inheriting UI controls for no good reason.
Fixes#5856
* Better location reporting for readonly DataField errors
* Better location reporting for readonly DataField property errors
* Use SyntaxKind instead of string for TryGetModifierLocation
This hides the generated types from intellisense if you have the relevant option in Rider enabled.
Good because honestly these just bloat IntelliSense, and if you want to show them there's an IDE setting for it.
* Duplicate dependency field analyzer
Detects cases of duplicate [Dependency] fields in a type. We apparently have 27 of these across RT + SS14.
* Fix duplicate dependencies in Robust
* New "must call base" analyzer.
This enforces that you actually call base when overriding stuff. This is intended for base methods like entity system's, where server/client systems overriding shared ones SHOULD call Initialize() and such.
* Add MustCallBase to entity system methods
* Enable roslyn extension tests in CI
* I'll be real I kinda just hoped that last one would work. dotnet test's --help documentation is useless garbage so I couldn't tell if that was supported or not. Guess not.
* Actually fix the Roslyn tests.
As far as I can tell, Roslyn tests haven't worked since #2976.
The tests used a pretty awful technique of linking the test code against the analyzer, so that the analyzer's copy of the relevant attributes got included into the test. This then broke when the namespace got changed by the linked PR.
Now the tests get an EmbeddedResource for the necessary test files compiled instead.
Also applied this to DependencyAssignAnalyzerTest because why not.
* Source gen reorganizations + component unpause generator.
This commit (and subsequent commits) aims to clean up our Roslyn plugin (source gens + analyzers) stack to more sanely re-use common code
I also built a new source-gen that automatically generates unpausing implementations for components, incrementing attributed TimeSpan field when unpaused.
* Fix warnings in all Roslyn projects
* Move to Central Package Management.
Allows us to store NuGet package versions all in one place. Yay!
* Update NuGet packages and fix code for changes.
Notable:
Changes to ILVerify.
Npgsql doesn't need hacks for inet anymore, now we need hacks to make the old code work with this new reality.
NUnit's analyzers are already complaining and I didn't even update it to 4.x yet.
TerraFX changed to GetLastSystemError so error handling had to be changed.
Buncha APIs have more NRT annotations.
* Remove dotnet-eng NuGet package source.
I genuinely don't know what this was for, and Central Package Management starts throwing warnings about it, so YEET.
* Fix double loading of assemblies due to ALC shenanigans.
Due to how the "sideloading" code for the ModLoader was set up, it would first try to load Microsoft.Extensions.Primitives from next to the content dll. But we already have that library in Robust!
Chaos ensues.
We now try to forcibly prioritize loading from the default ALC first to avoid this.
* Remove Robust.Physics project.
Never used.
* Remove erroneous NVorbis reference.
Should be VorbisPizza and otherwise wasn't used.
* Sandbox fixes
* Remove unused unit test package references.
Castle.Core and NUnit.ConsoleRunner.
* Update NUnit to 4.0.1
This requires replacing all the old assertion methods because they removed them 🥲
* Mute CA1416 (platform check) errors
TerraFX started annotating APIs with this and I can't be arsed to entertain this analyzer so out it goes.
* Fine ya cranky, no more CPM for Robust.Client.Injectors
* Changelog
* Oh so that's what dotnet-eng was used for. Yeah ok that makes sense.
* Central package management for remaining 2 robust projects
* Ok that was a bad idea let's just use NUnit 3 on the analyzer test project
* Oh right forgot to remove this one
* Update to a newer version of RemoteExecutor
* Disable RemoteExecutor test
https://github.com/dotnet/arcade/issues/8483 Yeah this package is not well maintained and clearly we can't rely on it.
* Fix immutable list serialization