A comprehensive static analysis tool for Go codebases that detects bugs, vulnerabilities, code smells, and provides quality metrics similar to SonarQube.
Comprehensive code analysis for Go projects
Deep AST-based inspection of Go syntax trees with comprehensive rule engine
Detects vulnerabilities including SQL injection, hardcoded secrets, and unsafe practices
Identifies potential runtime issues, logic errors, and missing error handling
Measures cyclomatic complexity and identifies overly complex functions
Comprehensive scoring system with grades A-F and quality trend analysis
CLI tool with console output, JSON export, and REST API interface
Get started with Nada in seconds
go install github.com/chaksack/nada@latest
Requires Go 1.21 or later. The binary will be installed to $GOPATH/bin/nada.
Download the latest release for your platform:
docker run --rm -v $(pwd):/workspace chaksack/nada analyze /workspace
Run Nada in a containerized environment without local installation.
git clone https://github.com/chaksack/nada.git
cd nada
make build
The binary will be built to build/nada.
Learn how to use Nada effectively
# Analyze current directory
nada analyze .
# Analyze specific project
nada analyze /path/to/project
# Export to JSON
nada analyze . --output report.json
# Include test files
nada analyze . --include-tests
# Verbose output
nada analyze . --verbose
# Exclude files
nada analyze . --exclude='*_test.go,vendor/*'
# With coverage profile
nada analyze . --coverage=coverage.out
# Analyze only staged changes
nada analyze . --diff=staged
# Analyze changes since main
nada analyze . --diff=origin/main
# Analyze unstaged changes
nada analyze . --diff=unstaged
| Flag | Short | Description | Default |
|---|---|---|---|
--output |
-o |
Output file for JSON report | - |
--coverage |
-c |
Coverage profile file | - |
--diff |
-d |
Analyze only changes | - |
--verbose |
-v |
Verbose output | false |
--include-tests |
-t |
Include test files | false |
--exclude |
-e |
Exclude file patterns | [] |
Comprehensive rule reference for code quality analysis
Checks for high cyclomatic complexity, deep nesting, and large functions
Detects security vulnerabilities including hardcoded secrets, SQL injection, and unsafe practices
Checks for missing function and type documentation
Checks for proper error handling and deprecated function usage
Checks for proper Go naming conventions and descriptive names
Checks for structural issues like TODO comments, long lines, and unused imports
Critical issues that should be fixed immediately (security vulnerabilities, major bugs)
Important issues that affect code quality and maintainability
Minor issues and code style improvements