Contributing
We welcome contributions to argus! Here's how to get started.
Development Setup
# Clone the repo
git clone https://github.com/Priyans-hu/argus.git
cd argus
# Install dependencies
go mod download
# Build
make build
# Run tests
make test
# Run linter
make lint
Project Structure
argus/
├── cmd/argus/ # CLI entry point
├── internal/
│ ├── analyzer/ # Core analysis logic
│ ├── detector/ # Pattern detectors
│ ├── generator/ # Output generators
│ └── config/ # Configuration
├── pkg/types/ # Public types
└── docs/ # Documentation (Docusaurus)
Adding a New Detector
- Create a new file in
internal/detector/ - Implement the detector logic
- Add tests in
*_test.go - Integrate in
internal/analyzer/parallel.go
Example detector:
type MyDetector struct {
rootPath string
files []types.FileInfo
}
func NewMyDetector(rootPath string, files []types.FileInfo) *MyDetector {
return &MyDetector{rootPath: rootPath, files: files}
}
func (d *MyDetector) Detect() *MyInfo {
// Detection logic
}
Pull Request Process
- Fork the repository
- Create a feature branch:
git checkout -b feat/my-feature - Make your changes
- Run tests:
make test - Run linter:
make lint - Commit with conventional commits:
git commit -m "feat: add feature" - Push and create a PR
Commit Convention
We use Conventional Commits:
feat:- New featurefix:- Bug fixdocs:- Documentationtest:- Testschore:- Maintenance
Code Style
- Run
go fmtbefore committing - Follow Effective Go
- Add tests for new functionality
- Document exported functions
Reporting Issues
- Use GitHub Issues
- Include reproduction steps
- Share relevant
argus scanoutput - Mention your OS and Go version