Repository navigation
feat(AC0033): make the rule opt-in (Info, disabled by default) - #585
Merged
Merged
Conversation
AC0033 now targets teams that want every app to send its HTTP calls from its own extension, so the Allow HttpClient Requests setting governs each app's calls in non-production environments. A shared base layer that sends HTTP calls for its dependent apps is a valid design, so the rule is Info and disabled by default. The resx text is rewritten around that intent and the tests enable the rule through a ruleset. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Summary
AC0033 (
RestClientRequiresHttpClientHandler) becomes an opt-in rule: default severityInfo,isEnabledByDefault: false.Intent: enable AC0033 when every app must send its HTTP calls from its own extension, regardless of its dependencies. In a non-production environment the runtime blocks an extension's HTTP requests unless Allow HttpClient Requests is turned on for that extension on the Extension Settings page, and after a production environment is copied to a sandbox the setting has to be turned on per extension. Without an
"Http Client Handler"implementation in the app, the System Application's default handler (or a handler in a dependency app) sends the request, so the app's own setting does not govern the call.A shared base layer that sends the HTTP calls for its dependent apps is a valid design, and AC0033 does not see handlers in dependencies. So the rule is off by default instead of reporting every dependent app.
Changes
DiagnosticDescriptors.cs: AC0033 isInfoand disabled by default. AC0034 is unchanged (Warning, enabled).ALCops.ApplicationCopAnalyzers.resx: AC0033 Title, MessageFormat and Description rewritten around the intent.RestClientRequiresHttpClientHandler.ruleset.jsonenables AC0033; the test fixture passes it throughRuleSetPath. No analyzer logic change..claude/rules/diagnostics/ac0033-ac0034-required-interface-implementation.md: purpose, severity/default decisions and test notes updated.Verification
dotnet build ALCops.sln: 0 errors;dotnet format ALCops.sln --verify-no-changes: clean.dotnet testfiltered to RestClientRequiresHttpClientHandler + TelemetryRequiresTelemetryLogger: 46/46 passed.HasDiagnosticcases fail (rule disabled by default); reverted.dotnet test ALCops.sln: all green.Validate-Rules.ps1: OK.Docs: ALCops/alcops.dev#206
🤖 Generated with Claude Code