Please note that this service is under alpha statement, we are actively working on it. It may be unstable and might completely change without warning. Help us by reporting!

Documentation

Find how to use FlintCI here!

FlintCI usage aims to be simpler and thinner as possible. This page contains the necessary steps to activate your repositories and how to configure the tools FlintCI uses.

If you are still looking for answers, please tweet us @FlintCI or open an issue on the project dashboard.

Getting started

Setting up a repository on FlintCI is done in very few steps:

  1. After login from your favorite coding platform, click on the Sync button to get your repositories list.
  2. Then, find the repository you want to activate and click on the Enable button. And voilĂ ! Your repository is ready!
  3. Push your configuration file to get FlintCI working. See the configuration section for more details.
  4. You may also adjust the way FlintCI will work on your repository with the settings form. Details are explained on the fields.

Configuration

FlintCI is configured through a yaml file in your repository. This yaml file controls which services are enabled with some options.

Put your .flintci.yml file in the root directory of your project. Here is a quick example:

services:
  eslint: true
  phpcsfixer:
    version: 1
    config_path: config/.php_cs

Note: You will never have to configure the services options trough this configuration file. FlintCI will directly use the native configuration file of each of them. Exceptions are made if some service options are given on the command line only.

Services

FlintCI is always working more and more tools for you. Take a look to our working list!

Don't you see the linter or the fixer you want? Just ask for it by opening an issue!

Some services have specific configuration keys. Here is the common ones:

  • version: The version of the service to use. It corresponds to the available Docker tags.
  • config_path: The path where the service configuration file is if it's different from the default.
  • path: The path you want the service to run.
  • paths: Same as path, but you may set many.

Remember, they are all optional!

composer-normalize

A composer plugin for normalizing composer.json.

services:
  composernormalize:
    version:        latest

ESLint

The pluggable linting utility for JavaScript and JSX.

services:
  eslint:
    version:        latest
    config_path:      ~
    paths:
  
      # Default:
      - .

PHP_CodeSniffer - phpcbf

PHP_CodeSniffer - Fixer utility.

The config_path configuration corresponds to the --standard binary option.

So you can also use a pre-defined ruleset (PSR1, PSR2, Squiz...) instead of a file.

If you also need to use an external vendor ruleset, just add it to your project composer.json file and tell FlintCI to run composer install!

services:
  phpcbf:
    version:        latest
    config_path:      ~
    paths:        []
  
    # Should the composer dependencies be installed before?
    composer:       false

PHP Coding Standards Fixer

A tool to automatically fix PHP coding standards issues.

services:
  phpcsfixer:
    version:        latest
    config_path:      ~

PHP_CodeSniffer

PHP_CodeSniffer tokenizes PHP files and detects violations of a defined set of coding standards.

The config_path configuration corresponds to the --standard binary option.

So you can also use a pre-defined ruleset (PSR1, PSR2, Squiz...) instead of a file.

If you also need to use an external vendor ruleset, just add it to your project composer.json file and tell FlintCI to run composer install!

services:
  phpcs:
    version:        latest
    config_path:      ~
    paths:        []
  
    # Should the composer dependencies be installed before?
    composer:       false

pycodestyle

Simple Python style checker in one Python file. Formerly called pep8.

services:
  pycodestyle:
    version:        latest
    config_path:      ~
    path:         .

RuboCop

A Ruby static code analyzer, based on the community Ruby style guide.

services:
  rubocop:
    version:        latest
    config_path:      ~
    paths:
  
      # Default:
      - .

ShellCheck

Finds bugs in your shell scripts.

services:
  shellcheck:
    version:        latest
    path:         .
    config:
  
      # Specify dialect.
      shell:        null # One of "sh"; "bash"; "dash"; "ksh"
  
      # Exclude types of warnings.
      exclude:
  
        # Examples:
        - CODE1
        - CODE2

xmllint

The xmllint program parses and fixes XML files.

services:
  xmllint:
    version:        latest
    path:         .
    config:
  
      # Corresponds to the XMLLINT_INDENT environment variable.
      indent:         4
  
      # Corresponds to the --encode cli option.
      encode:         null

yamllint

A tool to automatically fix YAML coding standards issues

services:
  yamllint:
    version:        latest
    config_path:      ~
    paths:
  
      # Default:
      - .

Reference

Here is the complete configuration reference with default values:

services:       # Required
  composernormalize:
    version:        latest
  eslint:
    version:        latest
    config_path:      ~
    paths:

      # Default:
      - .
  phpcbf:
    version:        latest
    config_path:      ~
    paths:        []

    # Should the composer dependencies be installed before?
    composer:       false
  phpcsfixer:
    version:        latest
    config_path:      ~
  phpcs:
    version:        latest
    config_path:      ~
    paths:        []

    # Should the composer dependencies be installed before?
    composer:       false
  pycodestyle:
    version:        latest
    config_path:      ~
    path:         .
  rubocop:
    version:        latest
    config_path:      ~
    paths:

      # Default:
      - .
  shellcheck:
    version:        latest
    path:         .
    config:

      # Specify dialect.
      shell:        null # One of "sh"; "bash"; "dash"; "ksh"

      # Exclude types of warnings.
      exclude:

        # Examples:
        - CODE1
        - CODE2
  xmllint:
    version:        latest
    path:         .
    config:

      # Corresponds to the XMLLINT_INDENT environment variable.
      indent:         4

      # Corresponds to the --encode cli option.
      encode:         null
  yamllint:
    version:        latest
    config_path:      ~
    paths:

      # Default:
      - .