Skip to content

Take 2: Added editorconifg, and ran phpcs fixes for uninstall file#16

Open
bhubbard wants to merge 1 commit intopressable:mainfrom
bhubbard:phpcs-fixes-uninstall-file
Open

Take 2: Added editorconifg, and ran phpcs fixes for uninstall file#16
bhubbard wants to merge 1 commit intopressable:mainfrom
bhubbard:phpcs-fixes-uninstall-file

Conversation

@bhubbard
Copy link
Contributor

@bhubbard bhubbard commented Dec 10, 2025

  • Updated composer packages
  • Added .editorconfig file
  • Ran phpcs fixes for uninstall.php

There is one remaining issue which is a commented out line to include one file:
include_once ('remove_mu_plugins_batcache_on_uninstall.php');

Summary by CodeRabbit

  • Chores

    • Introduced project-wide editor configuration for consistent coding standards across the team.
  • Refactor

    • Improved uninstall process reliability and consistency through code restructuring.

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

- Updated composer packages
- Added editorconfig file
- Ran phpcs fixes for uninstall.php

There is one remaining issue which is a commented out line to include one file:
```include_once ('remove_mu_plugins_batcache_on_uninstall.php');```
@coderabbitai
Copy link

coderabbitai bot commented Dec 10, 2025

Walkthrough

The changes introduce a project-wide .editorconfig file to standardize coding conventions and refactor uninstall.php to use require_once and simplify permission checks while preserving all existing deletion behavior.

Changes

Cohort / File(s) Change Summary
Configuration & Style
\.editorconfig
New file establishing global coding conventions (charset UTF-8, Unix line endings, tab indentation) with overrides for YAML (2-space indents), Markdown (preserve trailing whitespace), and legacy formats (CRLF line endings).
Plugin Uninstall
uninstall\.php
Replaced include_once with require_once; refactored permission guard from multi-line defined() check to compact !defined() with exit; adjusted comment spacing and standardized delete_option() call formatting.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Extra attention areas:
    • Verify the permission guard logic change in uninstall.php maintains intended security (!defined() with exit is functionally equivalent to previous defined() guard)
    • Confirm .editorconfig overrides (especially CRLF for TXT and wp-config-sample.php) align with project requirements

Poem

🐰 A rabbit hops through configs new,
With tabs and spaces, all in view,
The uninstall's tidy, trim and tight,
Require once—it's done just right!

Pre-merge checks and finishing touches

✅ 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 mentions 'editorconifg' which appears to be a typo for 'editorconfig', and covers the main changes (added .editorconfig and phpcs fixes for uninstall file).
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
.editorconfig (1)

16-23: Consider covering *.yaml and ensuring newline at EOF

If this repo ever uses .yaml in addition to .yml, you may want to include it in the YAML section; also, since insert_final_newline = true, ensure this file itself ends with a newline to avoid minor tooling warnings.

uninstall.php (1)

20-61: Option cleanup block looks consistent

The delete_option() list is straightforward and consistent; behaviorally this matches a typical uninstall routine. If you ever want to DRY it up, you could push the option names into an array and loop, but that’s purely a style/maintainability choice, not a blocker.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ab17138 and 5dbe3a2.

⛔ Files ignored due to path filters (1)
  • composer.lock is excluded by !**/*.lock
📒 Files selected for processing (2)
  • .editorconfig (1 hunks)
  • uninstall.php (1 hunks)
🔇 Additional comments (1)
.editorconfig (1)

1-24: Editorconfig matches WordPress conventions

Settings (tabs for code, LF by default, CRLF for wp-config-sample.php, no trimming in Markdown) all look consistent with typical WordPress standards. Nothing blocking here.

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.

1 participant