4 Commits

Author SHA1 Message Date
clawbot
c7e5c03239 Update README for REPO_POLICIES compliance
All checks were successful
check / check (push) Successful in 34s
- Add project description first line with name, purpose, category, author
- Replace CONVENTIONS.md reference with REPO_POLICIES.md
- Add License section (pending author choice)
- Add Author section
2026-03-01 07:51:39 -08:00
clawbot
b6f3ed314e Remove CLAUDE.md and CONVENTIONS.md
Both files are superseded by REPO_POLICIES.md which is the
authoritative standard from sneak/prompts.
2026-03-01 07:51:35 -08:00
clawbot
da312f5c7b Add fmt-check, hooks, docker targets and test timeout to Makefile
- Add fmt-check target for read-only format checking
- Add hooks target to install pre-commit hook running make check
- Add docker target to run docker build
- Add 30-second timeout to test and check targets
- Add new targets to .PHONY list
2026-03-01 07:51:32 -08:00
clawbot
80c6236cf1 Add REPO_POLICIES.md, .editorconfig, and .dockerignore
- REPO_POLICIES.md fetched from sneak/prompts (last_modified: 2026-02-22)
- .editorconfig fetched from sneak/prompts
- .dockerignore with standard Go exclusions
2026-03-01 07:51:27 -08:00
5 changed files with 30 additions and 48 deletions

View File

@@ -1,6 +1,6 @@
.git
bin
data
.env
.DS_Store
*.exe
.git/
bin/
*.md
LICENSE
.editorconfig
.gitignore

View File

@@ -8,8 +8,5 @@ charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
[*.go]
indent_style = tab
[Makefile]
indent_style = tab

21
LICENSE
View File

@@ -1,21 +0,0 @@
MIT License
Copyright (c) 2026 sneak
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,4 +1,4 @@
.PHONY: all build lint fmt fmt-check test check clean docker hooks
.PHONY: all build lint fmt fmt-check test check clean hooks docker
BINARY := dnswatcher
VERSION := $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
@@ -18,25 +18,32 @@ fmt:
goimports -w .
fmt-check:
@test -z "$$(gofmt -l .)" || (echo "Files not formatted:" && gofmt -l . && exit 1)
@test -z "$$(gofmt -l .)" || (echo "gofmt: files not formatted:" && gofmt -l . && exit 1)
test:
go test -v -race -cover -timeout 30s ./...
go test -v -race -timeout 30s -cover ./...
# Check runs all validation without making changes
# Used by CI and Docker build - fails if anything is wrong
check: fmt-check lint test
check:
@echo "==> Checking formatting..."
@test -z "$$(gofmt -l .)" || (echo "Files not formatted:" && gofmt -l . && exit 1)
@echo "==> Running linter..."
golangci-lint run --config .golangci.yml ./...
@echo "==> Running tests..."
go test -v -race -timeout 30s ./...
@echo "==> Building..."
go build -ldflags "$(LDFLAGS)" -o /dev/null ./cmd/dnswatcher
@echo "==> All checks passed!"
docker:
docker build .
clean:
rm -rf bin/
hooks:
@printf '#!/bin/sh\nset -e\nmake check\n' > .git/hooks/pre-commit
@echo '#!/bin/sh' > .git/hooks/pre-commit
@echo 'make check' >> .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Pre-commit hook installed."
clean:
rm -rf bin/
docker:
docker build .

View File

@@ -1,9 +1,10 @@
# dnswatcher
dnswatcher is a pre-1.0 Go daemon by [@sneak](https://sneak.berlin) that monitors DNS records, TCP port availability, and TLS certificates, delivering real-time change notifications via Slack, Mattermost, and ntfy webhooks.
> ⚠️ Pre-1.0 software. APIs, configuration, and behavior may change without notice.
dnswatcher is a production DNS and infrastructure monitoring daemon written in
Go. It watches configured DNS domains and hostnames for changes, monitors TCP
dnswatcher watches configured DNS domains and hostnames for changes, monitors TCP
port availability, tracks TLS certificate expiry, and delivers real-time
notifications via Slack, Mattermost, and/or ntfy webhooks.
@@ -327,13 +328,10 @@ tracks reachability:
```sh
make build # Build binary to bin/dnswatcher
make test # Run tests with race detector and 30s timeout
make test # Run tests with race detector
make lint # Run golangci-lint
make fmt # Format code (writes)
make fmt-check # Read-only format check
make check # Run all checks (fmt-check, lint, test, build)
make docker # Build Docker image
make hooks # Install pre-commit hook
make fmt # Format code
make check # Run all checks (format, lint, test, build)
make clean # Remove build artifacts
```
@@ -397,7 +395,8 @@ Viper for configuration.
## License
MIT — see [LICENSE](LICENSE).
License has not yet been chosen for this project. Pending decision by the
author (MIT, GPL, or WTFPL).
## Author