Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sunnysideup/silverstripe-easy-coding-standards

easy coding standards for Silverstripe projects, allows you to quickly lint a silverstripe project and do other common tasks
https://github.com/sunnysideup/silverstripe-easy-coding-standards

Last synced: about 2 months ago
JSON representation

easy coding standards for Silverstripe projects, allows you to quickly lint a silverstripe project and do other common tasks

Awesome Lists containing this project

README

        

# What it does

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

```shell

# 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-diff-analyser
- sake-git-remove-stale-branches
- sake-git-merge-develop-and-production
- sake-git-squash-and-pr
- sake-git-squash-commits
- sake-git-tag

# php
- sake-php-set-timezone

# lint
- sake-lint-all
- sake-lint-compat
- sake-lint-ecs
- sake-lint-ide-annotator
- 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-db-dump
- sake-ss-db-open
- sake-ss-dev-build
- sake-ss-flush
- sake-ss-rsync-asset
- sake-ss-start-new-module

# test
- sake-test-site

# 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:

```shell
composer require --dev sunnysideup/easy-coding-standards:dev-master
```

## global install (recommended - more likely to work)

1. open your terminal and type

```shell
composer global require sunnysideup/easy-coding-standards:dev-master
```

2. then add path to `~/.bashrc` (or otherwise):
choose the appropriate one ...

```shell
PATH=~/.composer/vendor/bin:$PATH
PATH=~/.config/composer/vendor/bin:$PATH
```

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

3. To enable it, run:

```shell
source ~/.bashrc
```

or restart your computer.

4. Now you should be able to run it from anywhere like this:

```shell
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:

```shell
sake-my-command -h
```

## Not installed globally?

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

```shell
vendor/bin/sake-my-command -h
```