Skip to content

Conversation

@tillig
Copy link
Member

@tillig tillig commented Sep 18, 2025

This enables several Roslyn analyzers that we hadn't previously enabled - things like missing/empty docs, code member ordering, checks for complexity, and so on. These were sort of "tech debt" things that would just take a while to enable and fix. I bit the bullet and fixed it. Hopefully this strikes a balance between "flexibility" and "order."

This is in preparation for the .NET 10 release, at which time we can remove some of the older targets and possibly get improved analyzer warnings. Should that happen, the major Autofac release would be a good time to take on any changes that could help with code maintenance.

No actual functional code changes took place. This is just reordering and adding missing docs. The complexity checks didn't fire off and issue any warnings. Unclear is due to the currently targeted frameworks.

I did notice we can't easily update the development dependencies like the test SDK while still targeting lower frameworks, so while a few dev dependencies were updated, many were not.

@codecov
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 74.38017% with 93 lines in your changes missing coverage. Please review.
✅ Project coverage is 77.98%. Comparing base (ab7ca4d) to head (10cecca).

Files with missing lines Patch % Lines
...Autofac/Core/Registration/ComponentRegistration.cs 45.00% 11 Missing ⚠️
src/Autofac/Core/Lifetime/LifetimeScope.cs 84.37% 4 Missing and 6 partials ⚠️
.../Features/OpenGenerics/OpenGenericServiceBinder.cs 52.63% 5 Missing and 4 partials ⚠️
src/Autofac/Core/Container.cs 27.27% 8 Missing ⚠️
...tofac/Core/Registration/ServiceRegistrationInfo.cs 60.00% 4 Missing and 4 partials ⚠️
src/Autofac/Core/ResolvedParameter.cs 53.33% 3 Missing and 4 partials ⚠️
...Generics/OpenGenericDecoratorRegistrationSource.cs 0.00% 7 Missing ⚠️
...ac/Features/GeneratedFactories/FactoryGenerator.cs 16.66% 3 Missing and 2 partials ⚠️
...ofac/Core/Registration/ComponentRegistryBuilder.cs 84.00% 4 Missing ⚠️
src/Autofac/Core/Resolving/SegmentedStack.cs 20.00% 4 Missing ⚠️
... and 14 more
Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #1468   +/-   ##
========================================
  Coverage    77.98%   77.98%           
========================================
  Files          211      211           
  Lines         5414     5414           
  Branches      1150     1150           
========================================
  Hits          4222     4222           
  Misses         693      693           
  Partials       499      499           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tillig tillig merged commit 21d4d2f into develop Sep 18, 2025
9 of 10 checks passed
@tillig tillig deleted the feature/enable-analyzers branch November 18, 2025 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants