Skip to content

Move formidable sniffs to separate ruleset file#2801

Merged
Crabcyborg merged 1 commit into
masterfrom
move_formidable_sniffs_to_separate_ruleset_file
Jan 14, 2026
Merged

Move formidable sniffs to separate ruleset file#2801
Crabcyborg merged 1 commit into
masterfrom
move_formidable_sniffs_to_separate_ruleset_file

Conversation

@Crabcyborg

@Crabcyborg Crabcyborg commented Jan 14, 2026

Copy link
Copy Markdown
Contributor

Summary by CodeRabbit

  • Chores
    • Expanded the code linting ruleset with new checks for whitespace formatting consistency, code simplification opportunities, and redundancy detection to improve code quality and consistency throughout the codebase.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai

coderabbitai Bot commented Jan 14, 2026

Copy link
Copy Markdown
Contributor
📝 Walkthrough

Walkthrough

This pull request expands the Formidable PHPCS ruleset by adding 27 new sniff rules for whitespace formatting and code analysis simplifications, then consolidates the sniff references in the main phpcs.xml configuration file.

Changes

Cohort / File(s) Summary
Ruleset Configuration
phpcs-sniffs/Formidable/ruleset.xml
Adds 7 new whitespace sniffs (blank line handling, spacing) and 20 new code analysis sniffs (simplifications, redundancy detection, strict comparisons, preference enforcement)
PHPCS Configuration
phpcs.xml
Consolidates 29 individual Formidable sniff references into a single generic Formidable rule, reducing explicit rule declarations while delegating to ruleset.xml

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

run analysis, run tests

Poem

🐰 Sniffs and spaces aligned with care,
Config consolidates everywhere,
Whitespace whispers, analysis sings,
One rule to guide all cleaner things!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: extracting whitespace and code analysis sniffs into a dedicated ruleset file and consolidating references in the main phpcs.xml.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.



📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between bc88346 and 3baa84a.

📒 Files selected for processing (2)
  • phpcs-sniffs/Formidable/ruleset.xml
  • phpcs.xml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: Cypress
  • GitHub Check: PHP 8 tests in WP 6.9
  • GitHub Check: PHP 7.4 tests in WP 6.9
  • GitHub Check: Cypress
🔇 Additional comments (2)
phpcs.xml (1)

230-231: Clean consolidation of custom sniffs.

This is a good refactoring pattern for PHPCS rulesets. The single <rule ref="Formidable" /> directive will automatically include all rules defined in phpcs-sniffs/Formidable/ruleset.xml, making future additions and modifications easier to manage in one place.

phpcs-sniffs/Formidable/ruleset.xml (1)

1-35: Well-organized ruleset structure with all implementations present.

All 27 referenced custom Formidable sniffs have corresponding implementation files in the codebase. The ruleset is cleanly organized with clear category comments and consistent naming conventions across WhiteSpace (7 sniffs) and CodeAnalysis (20 sniffs) categories. This centralized configuration improves maintainability by consolidating all custom sniff definitions in a single file.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Crabcyborg
Crabcyborg merged commit 4997cb7 into master Jan 14, 2026
36 checks passed
@Crabcyborg
Crabcyborg deleted the move_formidable_sniffs_to_separate_ruleset_file branch January 14, 2026 21:38
stephywells pushed a commit that referenced this pull request Apr 4, 2026
…parate_ruleset_file

Move formidable sniffs to separate ruleset file
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.

1 participant