StyleCI

The StyleCI Docs

Welcome to the StyleCI docs. You'll find comprehensive guides and documentation to help you start working with StyleCI as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    Documentation

Search results for "{{ search.query }}"

No results found for "{{search.query}}". 
View All Results

Configuration

This page will guide your through our simple configuration process.

StyleCI provides two ways to configure your repos. You can apply configuration either by committing a .styleci.yml file to the root of your repo, or by visiting the settings page for your repo, and applying it there.

If you want to use our header checking facility, you must configure that part on the settings page as that's the only part of the configuration not available through the .styleci.yml file.

Watch Out!

Setting configuration through the browser will override all config set in the .styleci.yml file.

Fixers and Presets

Our config file allows you to set a preset, and then enable/disable any fixers on top of that preset. Our default preset is recommended, and if you provide no config, we will use that preset to check your code. A complete list of presets is available here, and a complete list of fixers is available here.

Risky Fixers

Allowing the use of "risky" heuristic fixers is enabled by default in order to take advantage of what they have to offer. Care should be taken here, however. If you are looking to enable automatic fix PR sending and merging, then you may want to disallow risky fixers.

This is the risky option in the config.

Example

Here is an example config file that uses all our options:

preset: recommended

risky: false

enabled:
  - long_array_syntax
  - strict
  - unalign_double_arrow

disabled:
  - align_double_arrow
  - short_array_syntax

finder:
  exclude:
    - "tests"
  name:
    - "*.php"
  not-name:
    - "*Stub.php"
  contains:
    - "Foo"
  not-contains:
    - "config"
  path:
    - "foo/Stuff"
  not-path:
    - "libraries"
  depth:
    - "< 3"
    

Please note that we do not recommend actually copy/pasting this example file for use as it's pretty useless for most applications, but it's useful to demonstrate all the available options.

Need a hand?

Feel free to contact us at support@alt-three.com if you have any questions.


Configuration

This page will guide your through our simple configuration process.