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.
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.
# Install from tap (coming soon)
brew tap xeon-zolt/codecompass
brew install codecompass
# Or install directly (for now)
./install.sh
# Download and run installer
curl -sSL https://raw.githubusercontent.com/xeon-zolt/codecompass/main/install.sh | bash
# Or clone and run
git clone https://github.com/xeon-zolt/codecompass.git
cd codecompass
./install.sh
git clone https://github.com/xeon-zolt/codecompass.git
cd codecompass
go mod tidy
go build -ldflags "-s -w -X main.version=v1.0.0" -o codecompass
sudo cp codecompass /usr/local/bin/
After installation, set up your configuration:
# Generate configuration file
codecompass --generate-config
# View available options
codecompass --help
# Test installation
codecompass --version
Analyze current directory:
./codecompass --all
Analyze a specific repository:
./codecompass /path/to/your/project --all
Show only specific leaderboards:
./codecompass --authors --files --coverage
This 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-config
The configuration file allows you to ignore files, authors, rules, and paths, as well as set performance-related options.
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.