No description
  • Go 74.9%
  • HTML 21.2%
  • Shell 2.4%
  • Makefile 1.5%
Find a file
Felipe M. 44680b35cc
All checks were successful
CI / format (push) Successful in 21s
CI / goreleaser-lint (push) Successful in 13s
CI / lint (push) Successful in 1m58s
CI / test (push) Successful in 1m23s
CI / build (push) Successful in 2m16s
ci: migrate from Woodpecker CI to Forgejo Actions (#1)
Replace Woodpecker CI pipeline with Forgejo Actions workflows using
ci-base container image. Simplify Makefile to match current project
conventions and add ldflags to goreleaser for smaller binaries.

Reviewed-on: #1
Co-authored-by: Felipe M. <me@fmartingr.com>
Co-committed-by: Felipe M. <me@fmartingr.com>
2026-04-08 10:25:56 +02:00
.github/workflows ci: migrate from Woodpecker CI to Forgejo Actions (#1) 2026-04-08 10:25:56 +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 ci: migrate from Woodpecker CI to Forgejo Actions (#1) 2026-04-08 10:25:56 +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