A RubyCritic extension that calculates a SkunkScore to identify the most complex code with the least test coverage for refactoring prioritization.
Skunk is a Ruby gem that calculates a SkunkScore to assess technical debt in Ruby codebases. It identifies the most complex files with the least test coverage, helping developers prioritize refactoring and testing efforts. The tool extends RubyCritic by incorporating code coverage data from SimpleCov to provide a comprehensive quality metric.
Ruby developers and teams who want to systematically identify and address technical debt, particularly those maintaining large or legacy codebases where refactoring priorities are unclear.
Developers choose Skunk because it combines multiple code quality dimensions into a single actionable score, offers branch comparison to track progress, and integrates seamlessly with existing Ruby tools like RubyCritic and SimpleCov for a streamlined workflow.
A SkunkScore Calculator for Ruby Code -- Find the most complicated code without test coverage!
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
The SkunkScore ranks files by combining complexity, smells, and coverage, clearly highlighting the worst offenders for refactoring, as shown in the console output table with 'Worst SkunkScore'.
The -b flag allows comparing SkunkScores between feature branches and main, helping assess if changes improve or degrade code quality, demonstrated in the branch comparison example.
Supports console, JSON, and HTML outputs via CLI flags or programmatic configuration, enabling integration into different workflows and toolchains.
Extends RubyCritic and uses SimpleCov coverage data, leveraging existing Ruby ecosystem tools without requiring new infrastructure.
Requires SimpleCov to be installed and run separately to generate coverage data; if coverage is missing or outdated, the SkunkScore may be inaccurate, as warned in the README.
Only identifies problematic files without providing fixes; developers must manually write tests and refactor code, which the README admits by explaining how to decrease scores.
Need to configure both SimpleCov and Skunk, and regularly update coverage files, adding steps to the workflow that can be overlooked in fast-paced development.