Repository used for Linting Talk
Go to file
2018-07-16 22:40:59 +02:00
broken.php TASK: Add initial version 2018-07-16 22:40:59 +02:00
readme.rst TASK: Add initial version 2018-07-16 22:40:59 +02:00
valid.php TASK: Add initial version 2018-07-16 22:40:59 +02:00

Linting Talk

What is linting

A linter or lint refers to tools that analyze source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. The term originates from a Unix utility that examined C language source code.

https://en.wikipedia.org/wiki/Lint_(software)

Why do I need it?

  • Prevent syntax errors = 500 http error in production.
  • Prevent bugs.
  • Validate coding guideline = Prevent unnecessary merge conflicts.
  • Reduce complexity and mental overhead.

What to lint

PHP

TypoScript

https://github.com/martin-helmich/typo3-typoscript-lint

XML / XLIFF

http://xmlsoft.org/xmllint.html

JSON / composer.json

composer validate

YAML (Form extension)

https://github.com/adrienverge/yamllint

Summary

Check out possible linter. Integrate linter in CI, optionally also in local IDEs /editors.

Prevent "dumb" issues like invalid PHP syntax.

Prevent some security issues.

Further reading