Skip to content

Commit d8032ac

Browse files
authored
docs: rewrite readme, rfcs, and contributing (#555)
* docs: rewrite README, RFCs, and CONTRIBUTING * docs: fix Linux storage labels in RFC-006 (Opera/Vivaldi swapped)
1 parent 2ee7d0a commit d8032ac

15 files changed

Lines changed: 1416 additions & 2137 deletions

CONTRIBUTING.md

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,73 @@
11
# Contributing to HackBrowserData
22

3-
We appreciate your interest in contributing to the HackBrowserData! This document provides some basic guidelines for contributors.
3+
We appreciate your interest in contributing to HackBrowserData! This document provides guidelines for contributors.
44

55
## Getting Started
66

7-
- Always base your work from the `dev` branch, which is the development branch with the latest code.
7+
- Always base your work from the `main` branch.
88
- Before creating a Pull Request (PR), make sure there is a corresponding issue for your contribution. If there isn't one already, please create one.
9-
- Include the problem description in the issue.
9+
10+
## Go Version Constraint
11+
12+
This project **must build with Go 1.20** to maintain Windows 7 support. This is enforced by CI.
13+
14+
- Do **not** use features from Go 1.21+ (e.g., `log/slog`, `slices`, `maps`, `cmp` packages)
15+
- Do **not** bump the `go` directive in `go.mod` beyond `go 1.20`
16+
- `modernc.org/sqlite` is pinned at v1.31.1 (v1.32+ requires Go 1.21)
17+
18+
## Development Commands
19+
20+
```bash
21+
# Build
22+
go build ./cmd/hack-browser-data/
23+
24+
# Test
25+
go test ./...
26+
27+
# Lint (requires golangci-lint v2)
28+
golangci-lint run
29+
30+
# Format
31+
gofumpt -l -w .
32+
goimports -w -local github.com/moond4rk/hackbrowserdata .
33+
34+
# Spelling check
35+
typos
36+
```
1037

1138
## Pull Requests
1239

1340
When creating a PR, please follow these guidelines:
1441

1542
- Link your PR to the corresponding issue.
16-
- Provide context in the PR description to help reviewers understand the changes. The more information you provide, the faster the review process will be.
17-
- Include an example of running the tool with the changed code, if applicable. Provide 'before' and 'after' examples if possible.
43+
- Provide context in the PR description to help reviewers understand the changes.
44+
- Include 'before' and 'after' examples if applicable.
1845
- Include steps for functional testing or replication.
1946
- If you're adding a new feature, make sure to include unit tests.
2047

48+
### Commit Message Convention
49+
50+
Use [Conventional Commits](https://www.conventionalcommits.org/) format:
51+
52+
```
53+
feat: add support for new browser
54+
fix: resolve cookie decryption on Windows
55+
chore: update dependencies
56+
docs: improve RFC documentation
57+
refactor: simplify profile discovery logic
58+
test: add extraction tests for Firefox
59+
```
60+
2161
## Code Style
2262

23-
Please adhere to the existing coding style for consistency.
63+
- **Platform code**: use build tags (`_darwin.go`, `_windows.go`, `_linux.go`)
64+
- **Error handling**: use `fmt.Errorf("context: %w", err)` for wrapping; do not ignore errors unless it is deliberate best-effort cleanup (e.g. `Close`/`Remove`)
65+
- **Naming**: follow Go conventions
66+
- **Tests**: use `t.TempDir()` for filesystem tests
67+
- **Architecture**: see `rfcs/` for design documents
2468

2569
## Questions
2670

27-
If you have any questions or need further guidance, please feel free to ask in the issue or PR, or [reach out to the maintainers](mailto:i@moond4rk.com). We will reply to you as soon as possible.
71+
If you have any questions or need further guidance, please feel free to ask in the issue or PR, or [reach out to the maintainers](mailto:me@moond4rk.com). We will reply to you as soon as possible.
2872

2973
Thank you for your contribution!
30-

README.md

Lines changed: 138 additions & 146 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)