Permalink
Browse files

Allows global installation

  • Loading branch information...
dg committed Apr 2, 2018
1 parent 4a766a1 commit c04666da59987dbfab69d99ed742f8791409d5c9
Showing with 27 additions and 17 deletions.
  1. +2 −1 composer.json
  2. +20 −14 readme.md
  3. +5 −2 src/bootstrap.php
@@ -27,5 +27,6 @@
},
"autoload": {
"classmap": ["src/"]
}
},
"bin": ["code-checker"]
}
@@ -15,20 +15,6 @@ A simple tool to check source code against a set of Nette coding standards.
Documentation can be found on the [website](https://doc.nette.org/code-checker).


Installation
------------

The recommended way to install is via Composer:

```
composer create-project nette/code-checker
```

Note that this is a tool and not a library, so it cannot be installed using the command `composer require`.

It requires PHP version 5.6 and supports PHP up to 7.2.


Usage
-----

@@ -44,3 +30,23 @@ Options:
--short-arrays enforces PHP 5.4 short array syntax
--strict-types checks whether PHP 7.0 directive strict_types is enabled
```


Installation
------------

It requires PHP version 5.6 and supports PHP up to 7.2.

Install it via Composer. This project is not meant to be run as a dependency, so install it as standalone:

```
composer create-project nette/code-checker
```

Or install it globally via:

```
composer global require nette/code-checker
```

and make sure your global vendor binaries directory is in [your `$PATH` environment variable](https://getcomposer.org/doc/03-cli.md#global).
@@ -10,7 +10,10 @@
use Nette\CommandLine\Parser;
if (@!include __DIR__ . '/../vendor/autoload.php') {
$autoload = is_file(__DIR__ . '/../vendor/autoload.php')
? __DIR__ . '/../vendor/autoload.php'
: __DIR__ . '/../../../autoload.php';
if (@!include $autoload) {
echo 'Install packages using `composer update`';
exit(1);
}
@@ -37,7 +40,7 @@
$cmd = new Parser(<<<'XX'
Usage:
php code-checker.php [options]
php code-checker [options]
Options:
-d <path> Folder or file to scan (default: current directory)

0 comments on commit c04666d

Please sign in to comment.