- Bun 1.3.9+ — required for running tests and building binaries
bun installbun run buildOutput goes to dist/.
bun run build:binaryProduces dist/sonarqube-cli using Bun's single-file compiler. To install it locally:
bun run setupRun these before opening a pull request:
# Lint (ESLint + TypeScript-aware rules)
bun run lint
# Auto-fix safe lint issues
bun run lint:fix
# TypeScript type checking
bun run typecheck# Unit tests
bun test
# Unit tests with coverage
bun run test:coverage
# Script tests
bun run test:scripts
# Integration tests (require env vars — see below)
bun run test:integration
# All tests
bun run test:allIntegration tests hit real external services and require environment variables:
export SONAR_SECRETS_TOKEN="sqp_xxxxx" # SonarQube (Server, Cloud) token for secret scanning
export SONAR_SECRETS_AUTH_URL="https://sonarcloud.io" # SonarQube (Server, Cloud) URL for onboard-agent testsObtain a token from sonarcloud.io → Account → Security → Generate token.
If the variables are not set, the relevant tests are skipped automatically — this is expected for local development.
The README.md file is generated from the source code. When adding or modifying a command, please call:
bun run gen:docs