Vous êtes sur la page 1sur 13

PRE-COMMIT

28 Septembre 2022
Technical meeting | Aymen EL GHOUL
PLAN / SOMMAIRE

• Introduction

• Problématique

• Solution

• Outils

• Démo
Introduction: QUALITÉ D’UN LOGICIEL (ISO 9126)
Problématique

 +40 commentaires + de 30 push / pipelines ?


Solution

 Code source de qualité:


 Une architecture claire
 Un code source documenté
 Des fonctions mutualisées
 Compréhensible par tous les développeurs
 Ne réinvente pas la roue
 Testé unitairement
Git : Hooks
Outils: PHP Mess Detector

 https://github.com/sebastianbergmann/phpcpd
Outils: PHP Copy/Paste Detector

 https://github.com/sebastianbergmann/phpcpd
Outils: PHPCS (Code Sniffer)

 https://github.com/squizlabs/PHP_CodeSniffer
Outils: PHPStan - PHP Static Analysis Tool

 https://github.com/phpstan/phpstan
Outils: Autres outils

 PHP  JS/CSS  Autres langages:


 Security Checker  Stylelint  SpotBugs
 Phpunit  NPM script  CheckStyle
 Clover Coverage  ESLint  XmlLint
 Composer  JSLint  YamlLint
 TwigCs  JSHint  JsonLint
 PHPLintPhan  …  …
 …
GrumPHP:

 https://github.com/phpro/grumphp
Démo 

Vous aimerez peut-être aussi