bring the repo up to org standards (closes #1) #7

Open
clawbot wants to merge 1 commits from clawbot/dcf:issue-1-repo-standards into master
First-time contributor

Brings dcf to the org repo standards.

Tooling. A Makefile of thin shims over a full scripts-to-rule-them-all script/ set; .golangci.yml vendored byte-identical from sneak/prompts; docker-only linting via Dockerfile.lint; a Dockerfile with the lint and test stages, and a Gitea workflow running script/cibuild; prettier, editorconfig and dockerignore config. go.mod tidied (drops the unused lmittmann/tint indirect).

Lint. The canonical config reported 57 findings on pkg/dcf; they are cleared. Two were real bugs: findDCFMountPoints checked a never-assigned erro instead of the error from findAllMountPoints, discarding it, and privatePath was computed twice, so the first computation was dead.

README keeps all its content, reorganised into the required sections and gaining Entrypoints.

Things a reader would trip over

  • The default branch is still master. clawbot is not an admin on this repo, so the rename to main returns 403 on both branch creation and the default_branch edit. sneak has to flip it.
  • clawbot also has no write access to sneak/dcf, so this PR comes from a fork (clawbot/dcf) rather than a branch here. Pushing the branch to this repo is rejected by the pre-receive hook.
  • DCFStore is now Store and DCFObject is now Object (field DCFStoreRoot to StoreRoot). This is an API break, forced by revive's stutter rule, and it is the naming the fs.FS rework in #4 builds on.
  • Mountpoint selection behaves exactly as it did. Removing the dead privatePath store left the check that was actually live, which stats M4ROOT at the filesystem root rather than PRIVATE/M4ROOT. That, and a requestedCount off-by-one, are filed as #6 rather than changed here: both are behaviour decisions, not lint fixes.
  • .golangci.yml is in .prettierignore. Prettier formats YAML, and letting it reformat the vendored config would fork it from canonical. The vendored copy is byte-identical to sneak/prompts.
  • go.mod declares go 1.25.7, matching the pinned golang:1.25.7-bookworm builder image. Naming a newer toolchain would make the build stage download one.
  • The filesystem walk has no test coverage. It is reachable only through GetDCFStores, which needs real mounted media; fstest.MapFS testing arrives with #4. Coverage is over the exported surface instead of the placeholder test that was there.
  • The module path is unchanged (git.eeqj.de/sneak/dcf). Policy says sneak.berlin/go/<name>; moving it is a breaking change nobody asked for in the issue, so it is left for a decision.

closes #1

Brings `dcf` to the org repo standards. **Tooling.** A `Makefile` of thin shims over a full scripts-to-rule-them-all `script/` set; `.golangci.yml` vendored byte-identical from `sneak/prompts`; docker-only linting via `Dockerfile.lint`; a `Dockerfile` with the lint and test stages, and a Gitea workflow running `script/cibuild`; prettier, editorconfig and dockerignore config. `go.mod` tidied (drops the unused `lmittmann/tint` indirect). **Lint.** The canonical config reported 57 findings on `pkg/dcf`; they are cleared. Two were real bugs: `findDCFMountPoints` checked a never-assigned `erro` instead of the error from `findAllMountPoints`, discarding it, and `privatePath` was computed twice, so the first computation was dead. **README** keeps all its content, reorganised into the required sections and gaining **Entrypoints**. ### Things a reader would trip over - **The default branch is still `master`.** clawbot is not an admin on this repo, so the rename to `main` returns 403 on both branch creation and the `default_branch` edit. sneak has to flip it. - **clawbot also has no write access to `sneak/dcf`**, so this PR comes from a fork (`clawbot/dcf`) rather than a branch here. Pushing the branch to this repo is rejected by the pre-receive hook. - **`DCFStore` is now `Store` and `DCFObject` is now `Object`** (field `DCFStoreRoot` to `StoreRoot`). This is an API break, forced by revive's stutter rule, and it is the naming the `fs.FS` rework in https://git.eeqj.de/sneak/dcf/issues/4 builds on. - **Mountpoint selection behaves exactly as it did.** Removing the dead `privatePath` store left the check that was actually live, which stats `M4ROOT` at the filesystem root rather than `PRIVATE/M4ROOT`. That, and a `requestedCount` off-by-one, are filed as https://git.eeqj.de/sneak/dcf/issues/6 rather than changed here: both are behaviour decisions, not lint fixes. - **`.golangci.yml` is in `.prettierignore`.** Prettier formats YAML, and letting it reformat the vendored config would fork it from canonical. The vendored copy is byte-identical to `sneak/prompts`. - **`go.mod` declares `go 1.25.7`**, matching the pinned `golang:1.25.7-bookworm` builder image. Naming a newer toolchain would make the build stage download one. - **The filesystem walk has no test coverage.** It is reachable only through `GetDCFStores`, which needs real mounted media; `fstest.MapFS` testing arrives with https://git.eeqj.de/sneak/dcf/issues/4. Coverage is over the exported surface instead of the placeholder test that was there. - **The module path is unchanged** (`git.eeqj.de/sneak/dcf`). Policy says `sneak.berlin/go/<name>`; moving it is a breaking change nobody asked for in the issue, so it is left for a decision. closes #1
clawbot added 1 commit 2026-08-30 13:37:53 +02:00
Adopt the standard tooling: a Makefile of thin shims over a full
scripts-to-rule-them-all `script/` set, the canonical `.golangci.yml`
vendored byte-identical from `sneak/prompts`, docker-only linting via
`Dockerfile.lint`, a `Dockerfile` and Gitea workflow that gate every
push, and prettier/editorconfig/dockerignore config.

`make build` pointed at a `cmd/dcfinfo` that is not in the tree and
could never have succeeded; this repo is a library, so `build` is now
the compile check over every package.

Clear the 57 findings the canonical linter config reports on `pkg/dcf`.
Two were real: `findDCFMountPoints` checked a never-assigned `erro`
instead of the error from `findAllMountPoints`, discarding it, and
`privatePath` was computed twice so the first computation was dead.
Mountpoint selection otherwise behaves exactly as before; the defects
that survive are filed as issue #6, not fixed here.

Rename `DCFStore` to `Store` and `DCFObject` to `Object` (with its
`DCFStoreRoot` field to `StoreRoot`), which revive's stutter rule
requires and which the `fs.FS` rework in issue #4 will build on.

Replace the placeholder test with tests over the exported surface.
The filesystem walk stays uncovered: it is reachable only through
`GetDCFStores`, which needs real mounted media.

README keeps its content, reorganised into the required sections and
gaining Entrypoints.

(closes #1)
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u issue-1-repo-standards:clawbot-issue-1-repo-standards
git checkout clawbot-issue-1-repo-standards
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: sneak/dcf#7