•  
      request #13068 Start enforcing Tuleap PHP coding standard in CI pipelines
    Infos
    #13068
    Thomas Gerbet (tgerbet)
    2019-04-29 09:11
    2019-03-01 17:13
    13248
    Details
    Start enforcing Tuleap PHP coding standard in CI pipelines
    Currently the PHP coding standard is only enforced through a pre-commit hook and things might be missed.

    This step should be enforced by the CI.


    PHPCS [0] is not able to silence an existing set of issue in the codebase. As such, and to avoid too much false-positive, the sane approach [1] seems to progressively add rule to enforce to fix the corresponding issues all over the codebase.

    The existing pre-commit hook will be kept as is to try to do the best it can to detect issues and the CI will enforce a subset of the ruleset.


    To test the approach, a new coding standard rule is going to be added: the unused use in the PHP files will now be rejected.


    [0] https://github.com/squizlabs/PHP_CodeSniffer/
    [1] https://github.com/squizlabs/PHP_CodeSniffer/issues/2094#issuecomment-409688782
    Empty
    Dev tools
    Empty
    Empty
    Empty
    Stage
    Empty
    Closed
    2019-03-18
    Attachments
    Empty
    References

    Follow-ups