Eclipse Integration

Last updated on
11 March 2021

This documentation needs work. See "Help improve this page" in the sidebar.

Follow these steps to integrate Drupal Code Sniffer into Eclipse.

Requirements

Installation

  • Install Eclipse
  • Install PTI Plugin
  • Configure PTI:
    • Open Eclipse preferences -> PHP Tools -> PHP Codesniffer
    • Add a new "CodeSniffer Standard" - choose this library
    • Activate the library by checking the checkbox next to its name.
    • Make sure the Standard Tab Width configuration is set to 0. Otherwise you won't get notified about evil tabs in the code.

Usage

Use the PHP Tools entry in the context menu (right click) in the navigator or hit "Validate" within the context menu (right click) of a file.

Recommendations

  • Disable the autorun of validators to save performance.
  • Configure the "CodeSniffer Standard" to be use per project.

Known Issues

  • Please use the latest version of PTI to use it with Eclipse Indigo

Help improve this page

Page status: Needs work

You can: