Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Comptoir Comptoir
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 30
    • Issues 30
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • ComptoirComptoir
  • ComptoirComptoir
  • Issues
  • #18
Closed
Open
Issue created Feb 27, 2020 by Fabrice Gangler@fgangler🎨Owner4 of 4 checklist items completed4/4 checklist items

Pre-commit Git hook: check syntax (PHP, Json, XML, Yaml)

Documentation:

  • https://github.com/phpro/grumphp/blob/master/doc/tasks/phplint.md
  • https://github.com/phpro/grumphp/blob/master/doc/tasks/jsonlint.md
  • https://github.com/phpro/grumphp/blob/master/doc/tasks/xmllint.md
  • https://github.com/phpro/grumphp/blob/master/doc/tasks/yamllint.md

Todo list:

  • pre-commit: check PHP syntax, because "Parse error: syntax error" is not allowed.
  • pre-commit: check XML syntax
  • pre-commit: check Json syntax
  • pre-commit: check Yaml syntax

check PHP syntax

jakub-onderka/php-parallel-lint checks the syntax of PHP files, because "Parse error: syntax error" is not allowed

# install
composer require --dev jakub-onderka/php-parallel-lint

# usage
vendor/bin/parallel-lint ./src/
vendor/bin/parallel-lint ./tests/
vendor/bin/parallel-lint --exclude "vendor" .
Edited Feb 27, 2020 by Fabrice Gangler
Assignee
Assign to
Time tracking