NewChecker now takes *CheckerOptions with the named fields ManifestPath, BasePath and Fs, named and passed like ScannerOptions in the same package. Every call site, tests included, uses named fields; no positional form is kept.
Zero values:
nil Fs: the OS filesystem, as before and as ScannerOptions.Fs does, so behaviour and the package's one convention both hold.
nil options or empty ManifestPath: error manifest path cannot be empty.
empty BasePath: error base path cannot be empty.
The issue's audit of the package's other exported constructors found one more with positional arguments: NewManifestFromFile(fs, path) now takes *ManifestFromFileOptions (Path, Fs) with the same rules. NewBuilder and NewScanner take nothing, NewScannerWithOptions already takes options, and NewManifestFromReader(r) is the single-reader case the Go style guide exempts.
Judgement call: both paths are required. An empty BasePath used to mean the working directory, so mfer check --base "" now fails; the flag defaults to ., so normal use is unchanged.
Judgement call: options are passed by pointer, like NewScannerWithOptions; a nil pointer gets the empty-path error, not a panic.
The empty-manifest-path error is declared in checker.go though deserialize.go also returns it, to stay out of the error block #128 changes.
`NewChecker` now takes `*CheckerOptions` with the named fields `ManifestPath`, `BasePath` and `Fs`, named and passed like `ScannerOptions` in the same package. Every call site, tests included, uses named fields; no positional form is kept.
Zero values:
- nil `Fs`: the OS filesystem, as before and as `ScannerOptions.Fs` does, so behaviour and the package's one convention both hold.
- nil options or empty `ManifestPath`: error `manifest path cannot be empty`.
- empty `BasePath`: error `base path cannot be empty`.
The issue's audit of the package's other exported constructors found one more with positional arguments: `NewManifestFromFile(fs, path)` now takes `*ManifestFromFileOptions` (`Path`, `Fs`) with the same rules. `NewBuilder` and `NewScanner` take nothing, `NewScannerWithOptions` already takes options, and `NewManifestFromReader(r)` is the single-reader case the Go style guide exempts.
- Judgement call: both paths are required. An empty `BasePath` used to mean the working directory, so `mfer check --base ""` now fails; the flag defaults to `.`, so normal use is unchanged.
- Judgement call: options are passed by pointer, like `NewScannerWithOptions`; a nil pointer gets the empty-path error, not a panic.
- The empty-manifest-path error is declared in `checker.go` though `deserialize.go` also returns it, to stay out of the error block https://git.eeqj.de/sneak/mfer/pulls/128 changes.
- Deviation: no `TODO.md` entry, per https://git.eeqj.de/sneak/mfer/issues/76.
Closes https://git.eeqj.de/sneak/mfer/issues/78
Model: opus-5-5
NewChecker now takes *CheckerOptions (ManifestPath, BasePath, Fs), named
like ScannerOptions. A nil Fs still means the OS filesystem, as before and
as in ScannerOptions; nil options or an empty path return an error naming
the missing path.
Audit of the other exported constructors in mfer: NewManifestFromFile took
a filesystem and a path positionally; it now takes
*ManifestFromFileOptions (Path, Fs) with the same nil and empty rules.
NewBuilder and NewScanner take no arguments, NewScannerWithOptions already
takes options, and NewManifestFromReader takes one reader, which the style
guide exempts; these are unchanged.
Model: opus-5-5
Judgement call accepted: mfer check --base "" now fails instead of meaning the working directory. The issue makes an empty path an error, and an explicitly empty value quietly becoming a default is what the repo rejects.
Judgement call accepted: declaring the empty-manifest-path error in checker.go is sensible, since checker.go and deserialize.go both return it.
#83 is not pre-empted: CheckerOptions and ManifestFromFileOptions join the public API, but NewManifestFromFile still returns the unexported manifest type, so the export-or-interface choice stays open.
Model: opus-5-5
Review passed.
Gated on `next` at `7088857`.
- Judgement call accepted: `mfer check --base ""` now fails instead of meaning the working directory. The issue makes an empty path an error, and an explicitly empty value quietly becoming a default is what the repo rejects.
- Judgement call accepted: declaring the empty-manifest-path error in `checker.go` is sensible, since `checker.go` and `deserialize.go` both return it.
- https://git.eeqj.de/sneak/mfer/issues/83 is not pre-empted: `CheckerOptions` and `ManifestFromFileOptions` join the public API, but `NewManifestFromFile` still returns the unexported manifest type, so the export-or-interface choice stays open.
Model: opus-5-5
clawbot
merged commit 0a9963002c into next2026-10-04 12:19:32 +02:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
NewCheckernow takes*CheckerOptionswith the named fieldsManifestPath,BasePathandFs, named and passed likeScannerOptionsin the same package. Every call site, tests included, uses named fields; no positional form is kept.Zero values:
Fs: the OS filesystem, as before and asScannerOptions.Fsdoes, so behaviour and the package's one convention both hold.ManifestPath: errormanifest path cannot be empty.BasePath: errorbase path cannot be empty.The issue's audit of the package's other exported constructors found one more with positional arguments:
NewManifestFromFile(fs, path)now takes*ManifestFromFileOptions(Path,Fs) with the same rules.NewBuilderandNewScannertake nothing,NewScannerWithOptionsalready takes options, andNewManifestFromReader(r)is the single-reader case the Go style guide exempts.BasePathused to mean the working directory, somfer check --base ""now fails; the flag defaults to., so normal use is unchanged.NewScannerWithOptions; a nil pointer gets the empty-path error, not a panic.checker.gothoughdeserialize.goalso returns it, to stay out of the error block #128 changes.TODO.mdentry, per #76.Closes #78
Model: opus-5-5
Review passed.
Gated on
nextat7088857.mfer check --base ""now fails instead of meaning the working directory. The issue makes an empty path an error, and an explicitly empty value quietly becoming a default is what the repo rejects.checker.gois sensible, sincechecker.goanddeserialize.goboth return it.CheckerOptionsandManifestFromFileOptionsjoin the public API, butNewManifestFromFilestill returns the unexported manifest type, so the export-or-interface choice stays open.Model: opus-5-5