No description
  • Go 74.9%
  • HTML 21.2%
  • Shell 2.4%
  • Makefile 1.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Felipe M. 24f90b1b8b
All checks were successful
CI / goreleaser-lint (push) Successful in 22s
CI / format (push) Successful in 2m23s
CI / build (push) Successful in 1m52s
CI / lint (push) Successful in 3m44s
CI / test (push) Successful in 3m2s
Authenticate the setup actions against the GitHub API
setup-go, setup-node and setup-bun resolve versions through
api.github.com. Anonymously that is sixty requests an hour for the
whole runner host, and the jobs started failing on it. GH_API_TOKEN is
a read-only GitHub token held as a Forgejo secret.

Where the secret is absent the input is empty and the action falls back
to an anonymous request, exactly as before.
2026-09-22 12:54:19 +02:00
.github/workflows Authenticate the setup actions against the GitHub API 2026-09-22 12:54:19 +02:00
cmd/dharma initial release 2025-05-04 10:49:50 +02:00
pkg ci: migrate from Woodpecker CI to Forgejo Actions (#1) 2026-04-08 10:25:56 +02:00
scripts initial release 2025-05-04 10:49:50 +02:00
testsite initial release 2025-05-04 10:49:50 +02:00
.gitignore Add HTML report format with filtering capabilities 2026-01-17 17:25:10 +01:00
.goreleaser.yml ci: migrate from Woodpecker CI to Forgejo Actions (#1) 2026-04-08 10:25:56 +02:00
go.mod initial release 2025-05-04 10:49:50 +02:00
go.sum initial release 2025-05-04 10:49:50 +02:00
LICENSE initial release 2025-05-04 10:49:50 +02:00
Makefile Give golangci-lint five minutes 2026-09-22 12:48:32 +02:00
README.md Add HTML report format with filtering capabilities 2026-01-17 17:25:10 +01:00
testsite_test.go initial release 2025-05-04 10:49:50 +02:00

Dharma

A website link checker that crawls websites to find broken links, images, CSS references, and more.

Features

  • Crawls websites and checks for broken links, images, stylesheets, and other references
  • Checks both internal and external links
  • Supports CSS file scanning for @import and url() references
  • Concurrent requests for faster scanning
  • Multiple output formats (pretty terminal output, JSON, CSV)
  • Configurable scan depth, concurrency, and timeout

Installation

Using go install

go install git.nakama.town/fmartingr/dharma@latest

From releases

Download the latest release from the releases page for your platform, there are binaries for Linux, macOS and Windows along with Alpine, Fedora and Debian packages.

From Source

git clone git.nakama.town/fmartingr/dharma
cd dharma
go run ./cmd/dharma/.

Usage

# Basic usage (defaults to 'pretty' output format)
dharma https://example.com

# Use JSON output format
dharma --format json https://example.com

# Create a report in HTML
dharma --format html https://example.com > report.html

# Increase concurrency and depth
dharma --concurrency 20 --depth 5 https://example.com

# Increase timeout for slow sites
dharma --timeout 30 https://example.com

# Enable verbose output
dharma --verbose https://example.com

Command Line Options

  • --format, -f: Output format (pretty, json, csv) (default: "pretty")
  • --concurrency, -c: Number of concurrent requests (default: 10)
  • --depth, -d: Maximum depth to crawl (default: 3)
  • --timeout, -t: Timeout in seconds for each request (default: 10)
  • --verbose, -v: Enable verbose output

Development

Testing

The project includes a comprehensive test suite:

# Run all tests
go test -v ./...

# Run tests excluding integration tests
go test -v -short ./...

# Run testsite tests specifically
make test-testsite

A test site is included in the testsite/ directory to test the tool against a controlled environment with known broken and working links. The test suite will start a local HTTP server for this test site and run the tool against it to verify its functionality.

License

LICENSE