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

Rule S6803 is invalid #9118

Closed
davidmilligan opened this issue Apr 17, 2024 · 1 comment
Closed

Rule S6803 is invalid #9118

davidmilligan opened this issue Apr 17, 2024 · 1 comment

Comments

@davidmilligan
Copy link

Description

Rule S6803 states that: Parameters with SupplyParameterFromQuery attribute should be used only in routable components. Component parameters can only receive query parameter values in routable components with an @page directive.

This logic is invalid because any component can potentially be a routable component because any component can inherit from another component and add an @page directive, which would then make the [SupplyParameterFromQuery] from the inherited component once again valid/meaningful.

This rule should be either removed entirely or only apply to components that are sealed (there is no razor syntax for sealing a component, so I imagine this is a very uncommon occurrence)

@mary-georgiou-sonarsource
Copy link
Contributor

mary-georgiou-sonarsource commented Apr 23, 2024

Hello @davidmilligan,

Thanks a lot for your feedback.

Indeed, what you mention is correct.
We decided to deprecate the rule (see issue here).
In the next release, this rule will be removed from the default quality profile so no issues will be raised.

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

No branches or pull requests

2 participants