Skip to content

[master] DisallowSpaceIndentSniff + "tab_width=4" #299

@aik099

Description

@aik099

When tab_width config option (or command line argument) is used, then each tab is converted to 4 spaces. In PHPCS 1.5.x this results in every sniff, that is looking specifically for TABs will fail, including DisallowSpaceIndentSniff.

In PHPCS 2.x version of that sniff this is fixed, because orig_content is used for checks, which still has TABs.

I wonder how safe it is to use tab_width option for projects, where TABs are used for indentation. I though it's main purpose was to help projects where indentation is done with spaces to deal with accidentally found TABs. Am I right?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions