A comprehensive code quality navigation tool that helps you understand and improve your codebase. CodeCompass combines insights from various sources, including linting results and Git history, to provide detailed leaderboards and metrics.
- Features
- Installation
- Usage
- Command Line Options
- Configuration
- CI Charts
- Development
- Contributing
- License
CodeCompass provides a multi-dimensional view of your codebase, represented by compass directions:
- 🧭 North: Identifies authors who introduced the most lint issues.
- 🧭 South: Highlights files with the highest number of linting problems.
- 🧭 East: Shows the most frequently violated ESLint rules.
- 🧭 West: Ranks files by their lines of code.
- 🧭 And more: Provides leaderboards for commit activity, code coverage, code churn, bug density, technical debt, and spell-checking.
git clone https://github.com/xeoncross/codecompass
cd codecompass
go mod tidy
CGO_ENABLED=0 go build -o codecompass main.go
chmod +x codecompassbrew tap xeoncross/tap
brew install codecompassAnalyze current directory:
./codecompass --allAnalyze a specific repository:
./codecompass /path/to/your/project --allShow only specific leaderboards:
./codecompass --authors --files --coverageThis creates a .codecompass.rc file with all available options:
./codecompass --generate-config| Option | Description |
|---|---|
--authors |
Show author leaderboard (lint issue contributors) |
--files |
Show file leaderboard (most problematic files) |
--rules |
Show rule leaderboard (most violated rules) |
--loc |
Show lines of code leaderboard |
--commits |
Show regular commit count leaderboard (non-merges) |
--merges |
Show merge commit count leaderboard |
--recent |
Show recent contributors leaderboard |
--coverage |
Show code coverage leaderboard |
--churn |
Show code churn leaderboard |
--bugs |
Show bug density leaderboard |
--debt |
Show technical debt leaderboard |
--spellcheck |
Show spell check leaderboard |
--summary |
Show repository summary |
--all |
Show all leaderboards |
For a full list of options, run ./codecompass --help.
CodeCompass can be configured via a .codecompass.rc file. To generate a sample configuration file, run:
./codecompass --generate-configThe configuration file allows you to ignore files, authors, rules, and paths, as well as set performance-related options.
Every push to the main branch (and manual workflow triggers) automatically generates visualization charts using CodeCompass. These charts include:
- radar.svg: A comprehensive radar chart showing various code quality metrics
- trends.csv: Historical trend data for tracking code quality over time
The generated charts are available as downloadable artifacts from the Actions tab. Look for the "Charts" workflow runs to download the latest codecompass-charts artifact containing both files.
To run the tests, use the following command:
go test ./...- Fork the repository.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.