{{ambox type=content text=merge with Coding Standards}}
Cleaning up your filesystem is as important as cleaning the lint out of the dryer screen[1].
Find symbolic links that are broken
find . -type l -! -exec test -e {} \; -print
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 -l
switch. For the MediaWiki project, the full list of Continuous Integration entry points describes the tools used in various circumstances. For instance, core uses php-parallel-lint for checking PHP syntax. (See the 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 "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
- ↑ Real lint from the dryer can be saved and used as an excellent fire-starter -- which is exactly why you also want to periodically clean it out of your ductwork!