find . -type l -! -exec test -e {} \; -print
</source>
== Syntax checkers ==
The verb 'lint' means to check some code for syntax violations. PHP has a built-in linter that you can invoke from the CLI with the <code>-l</code> switch. For the MediaWiki project, the full list of [[mw:Continuous_integration/Entry_points|Continuous Integration entry points]] describes the tools used in various circumstances. For instance, core uses [https://github.com/php-parallel-lint/PHP-Parallel-Lint php-parallel-lint] for checking PHP syntax. (See the [https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/core/+/refs/heads/master/composer.json#97 composer.json] file)
=== Continuous Integration ===
For continuous integration, you want to incorporate your linters into the source code repository as a commit hook. For example, in GitHub, this is referred to as "GitHub Actions". It can be important to make these available as repository hooks for another reason: forks and pull-requests can be done right in the web browser for sites like GitHub meaning you might be merging code that has never been through a true development environment or IDE.
GitHub has a marketplace product called "[https://github.com/marketplace/actions/super-linter Super Linter]" that basically will lint all the various languages and technologies you could want.
=== Local Development ===
To bring the warnings (or errors) closer to development, you want to make the tools available in your project as a 'Dev' dependency and setup commands that can be run with [[Composer]]. This way developers can use the tools to check their work '''before''' committing.
{{References}}
[[Category:Filesystems]]
[[Category:MediaWiki]]
[[Category:Continuous Integration]]
[[Category:Tools]]