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

docs: Fix docs for disabled rules in rulesets #6679

Merged

Conversation

julienfalque
Copy link
Member

No description provided.

@coveralls
Copy link

coveralls commented Nov 8, 2022

Pull Request Test Coverage Report for Build 3421913941

  • 0 of 23 (0.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.03%) to 92.879%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/Documentation/RuleSetDocumentationGenerator.php 0 23 0.0%
Totals Coverage Status
Change from base Build 3399624186: -0.03%
Covered Lines: 17283
Relevant Lines: 18608

💛 - Coveralls

$rules = $definition->getRules();
$rules = array_filter(
$definition->getRules(),
static fn ($config) => false !== $config,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

like the strict check against explicitly disabled rule by comparing to false.

Copy link
Member

@keradus keradus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it. I wonder if we can cover with tests somehow?

@julienfalque
Copy link
Member Author

I wonder if we can cover with tests somehow?

IMO the generated docs are the best test cases we can have, not sure we need something else.

@julienfalque
Copy link
Member Author

julienfalque commented Nov 8, 2022

Actually the docs should still document the fact that rulesets do disable those rules. I'm going to rework these changes a bit.

@julienfalque julienfalque changed the title docs: Remove disabled rules from rulesets docs docs: Fix docs for disabled rules in rulesets Nov 8, 2022
@julienfalque julienfalque merged commit 046ff90 into PHP-CS-Fixer:master Nov 17, 2022
@julienfalque julienfalque deleted the docs-rulesets-disabled-rules branch November 17, 2022 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants