sunnysideup/easy-coding-standards

ECS PHP Linting.

Installs: 965

Dependents: 1

Suggesters: 1

Security: 0

Stars: 5

Watchers: 3

Forks: 0

Open Issues: 5

Language:Shell

Type:silverstripe-vendormodule


README

Lints your silverstripe php code, checks for potential bugs, and also has a raft of other helpful commands.

tl;dr

Install as global composer package and then try to access the commands, starting with sake- from the command line.

commands available:

# help
 - sake-help

# composer
 - sake-composer-available-updates
 - sake-composer-update

# find
 - sake-find-in-files
 - sake-find-large-files

# git
 - sake-git-commit-and-push
 - sake-git-commit-and-push-vendor-packages
 - sake-git-remove-stale-branches
 - sake-git-merge-develop-and-production
 - sake-git-squash-commits
 - sake-git-tag


# php
 - sake-php-set-timezone

# lint
 - sake-lint-all
 - sake-lint-compat
 - sake-lint-ecs
 - sake-lint-js
 - sake-lint-one-file
 - sake-lint-rector
 - sake-lint-remove-origs
 - sake-lint-stan

# webpack
 - sake-npm-build
 - sake-npm-dev
 - sake-npm-install
 - sake-npm-watch

# silverstripe
 - sake-ss-add-site
 - sake-ss-dev-build
 - sake-ss-rsync-asset
 - sake-ss-dump-database
 - sake-ss-start-new-module

# scrutinizer
 - sake-scrutinizer-add

# machine maintenance
 - sake-update-vs-code

How to install for one project (not recommended - as it may not work)

  1. open your terminal
  2. browse to root folder of your project and type:
composer require --dev sunnysideup/easy-coding-standards:dev-master

global install (recommended - more likely to work)

  1. open your terminal and type
composer global require sunnysideup/easy-coding-standards:dev-master
  1. then add path to ~/.bashrc (or otherwise): choose the appropriate one ...
PATH=~/.composer/vendor/bin:$PATH
PATH=~/.config/composer/vendor/bin:$PATH

This will make the global composer vendor/bin available anywhere (use with care!).

  1. To enable it, run:
source ~/.bashrc

or restart your computer.

  1. Now you should be able to run it from anywhere like this:
sake-lint-ecs [dir]

(this command, and all the other commands listed above).

How to use:

Commands should be run from the root directory of your project.

To find out the options for a specific command:

sake-my-command -h

Not installed globally?

If not installed globally, then you should add vendor/bin/ in front of the commands.

vendor/bin/sake-my-command -h