AUTOMATE YOUR CODE QUALITY MAINTAINING THE CHAOS

MAINTAINING THE CHAOS WHO AM I? I’m Steve McDougall ‣ PHP User Group Organiser ‣ Conference Organiser ‣ Experienced Developer ‣ PHP Advocate

MAINTAINING THE CHAOS MANAGING CODE QUALITY CAN GET CONFUSING PRETTY QUICKLY

MAINTAINING THE CHAOS AN EVOLVING SYSTEM INCREASES ITS COMPLEXITY UNLESS WORK IS DONE TO REDUCE IT Prof. Meir Lehman, Middlesex University

THE FIGHT AGAINST CHAOS

MAINTAINING THE CHAOS ENTER GRUMPHP

MAINTAINING THE CHAOS YAML GOODNESS Simple to use YAML confuration files

MAINTAINING THE CHAOS WHAT DOES IT DO With GrumPHP you set certain tasks to run on git pre-commit hooks. These can be configured per task.

LETS BREAK DOWN A FEW TASKS

MAINTAINING THE CHAOS FILE SIZE CHECKER max_size: The target value may use magnitudes of kilobytes (k, ki), megabytes (m, mi), or gigabytes (g, gi) ignore_patterns: This is a list of patterns that will be ignored. With this option you can skip files.

MAINTAINING THE CHAOS GIT BLACKLIST keywords: Use this parameter to specify your blacklisted keywords list. triggered_by: This option will specify which file extensions will trigger the git blacklist task. regexp_type This option allows you to choose the type of regexp you want to use for patterns (can be G for POSIX basic, E for POSIX extended or P for Perl Compatible).

MAINTAINING THE CHAOS PHP LINT exclude: Any directories to be excluded from linting. short_open_tag: This option can allow PHP short open tags. triggered_by: Any file extensions that you wish to be passed to the linter.

MAINTAINING THE CHAOS THERE ARE MANY OTHER TASKS ALREADY AVAILABLE From Doctrine ORM to NPM Scripts and Phan there are many pre-built tasks you can configure to run. Alongside these custom tasks can be built as required.

TEXT MAINTAINING CODE QUALITY AMIDST THE CHAOS IS EASIER WITH TOOLS, STOP STRUGGLING. Steve McDougall

GitHub: JustSteveKing Twitter: @JustSteveKing THANK YOU FOR LISTENING