Skip to content

php-import-checker helps you know when a given class is imported but not used, providing a easy way to keep your code clean and organized.

License

Notifications You must be signed in to change notification settings

marabesi/php-import-checker

Repository files navigation

php-import-checker

Codacy Badge Build status Coverage Status Buy Me A Coffee

php-import-checker helps you know when a given class is imported but not used, providing a easy way to keep your code clean and organized.

Features

  • Highlight every unused class that is imported with use
  • Change the color to fit your theme
  • opt-in for latest changes and give feedback

Settings

The settings described in this section go under the json option php.import.highlight, a basic configuration that would change the highlight color, would be something like:

"php.import.highlight": {
  "color": "#EDF791",
  "use_next_version": false
  "ignore_comments": true
}
Option Type Description
color String Uses the RGB color defined in this option to highlight the unused imports - helpful to match the color with your preferred theme.
use_next_version Boolean Opt-in to the latest changes to the extension without breaking current behavior. Note: if you are using this option and find anything wrong, please open an issue.
ignore_comments Boolean If set to true, does not take into account commented code - this option only works if use_next_version is set to true

Requirements

Visual Code 1.6 +

Demos

  • Manually invoke the extension checker

Highlight unused imports

  • Change the color to the one you want to

Change highlight color

Publications