YAML configuration file

CodeOversight makes it very easy to configure your project's Code Rules. One of the ways you can configure the Code Rules is by adding a codeoversight.yml file to the root of your repository.

Prefer not to add a configuration file? You can also configure the Code Rules from within the App

Creating a configuration file

When a codeoversight.yml is present in the root directory of your repository it will automatically be picked up and used.

Want to get kick-started creating your own configuration file? Use this handy template!

To view all possible values with explanations, please view the corresponding language Code Rule doc:

Note: YAML configuration files will cause the build to fail when a tab is used for spacing.

Pre-configured configurations

Using a configuration file makes it very easy to share with one another. We've got a few configurations available for you to use:

Example configuration file

This is an example of a configuration file

    align_array_elements:                            space
    align_doc_tags:                                  double_space
    align_variables:                                 space
    closing_newline:                                 add
    closing_php_tag:                                 remove
    control_structure_parentheses_inner_whitespace:  whitespace
    doc_function_whitespace:                         no_space
    else_if_whitespace:                              no_space
    exclamation_whitespace:                          whitespace
    force_control_structure_braces:                  force
    function_args_separator_whitespace:              whitespace
    function_parentheses_inner_whitespace:           whitespace
    indentation_whitespace:                          tab
    opening_doc_asterisk:                            double
    php_tag_casing:                                  lower
    php_tags:                                        full_php_tags
    remove_double_semicolon:                         remove
    remove_empty_trailing_leading_doc_lines:         remove
    semicolon_before_closing_php_tag:                add
    static_array_index_whitespace:                   no_space
    string_operator_whitespace:                      whitespace
    trailing_whitespace:                             remove
    true_false_casing:                               lower
    type_cast_casing:                                lower
    type_cast_inner_whitespace:                      no_space
    use_quotes:                                      single_quotes
    variable_array_index_whitespace:                 whitespace
    whitespace_after_control_structure:              whitespace
    whitespace_after_doc_asterisk:                   single_space
    whitespace_after_else:                           space
    whitespace_after_function_open:                  newline
    whitespace_after_function:                       double_newline
    whitespace_before_control_structure_brace:       space
    whitespace_before_control_structure_parentheses: whitespace
    whitespace_before_doc_asterisk:                  space
    whitespace_before_else:                          space
    whitespace_before_function_brace:                space
    whitespace_before_function_close:                newline
    whitespace_before_function_parentheses:          no_space

        - /blacklisted-dir1/
        - /blacklisted-dir2/
        - blacklisted-file1.php

Still need help? Get in touch! Last modified on Sunday 11th Feb 2018