Ruby Language Support
Summary
Details
File extensions
By default, Ruby files are defined as:
These patterns can be overridden from qlty.toml
.
Code coverage setup
QLTY supports code coverage for Ruby through SimpleCov. For a full working example, see our example Ruby repository.
SimpleCov configuration
To instrument test coverage with SimpleCov:
- Install SimpleCov:
- Configure SimpleCov to generate JSON reports:
If you want to combine the JSON format with other formats, use SimpleCov’s MultiFormatter
:
- Publish SimpleCov’s JSON coverage reports using
qlty coverage publish
:
For GitHub Actions users, you can use our example workflow.
Supported Ruby versions
We officially support Ruby 2.5 and later for maintainability checks and code coverage. SimpleCov version 0.22.0+ is recommended for code coverage. Each plugin may have its own version requirements.