AtomLinter / linter-php

Lint PHP on the fly, using php -l
MIT License
67 stars 19 forks source link

linter-php

Build Status Dependency Status apm apm

This package will lint PHP files and embedded PHP within HTML files in Atom through php -l.

Installation

You will need to have php installed on your system before trying to use this package, please follow the instructions on their site to accomplish this.

After installing php on your system you can install this package by either searching for it within Atom's package installation section of the settings or by running the following command in a terminal:

apm install linter-php

As this package only provides a service, you will need something to run it. As such, the Linter package will be installed automatically for you if it isn't already installed. This will provide the user interface and run the linter for you.

Setup

Once the package is installed you may need to specify the path to the php executable if Atom is not able to find it automatically. You can do this from Atom's settings menu or by editing your ~/.atom/config.cson file (choose Open Your Config in Atom's menu). If editing the file by hand you should modify/create a section like the following:

'linter-php':
  # php path. run 'which php' to find the path
  'executablePath': /usr/bin/php

Additional settings can be found in the consumer of your linter providers, typically this is the Linter package automatically installed with linter-php. Global settings like linting delay must be adjusted here.

Maintainers

The following people have stepped up to take responsibility for this repository and should be consulted on any releases or major changes.