test(11.1-06): plant one fixture per docs checker rule and run them in the gate
- testdata/clean passes every check; 63 violation cases each overlay one fault and a want.txt naming the single problem it must produce - TestPlantedViolations also plants the forbidden name (split literals) and symlink escapes at run time; TestBuildOutputGuard covers --out - check-phase11.1.sh --self-test runs the corpus through a go test -json detector that refuses FAIL, SKIP, zero tests and no tests to run - the self-test scratch copy now carries examples/ and README.md, so its baseline sees the example command literals the real tree sees
This commit is contained in:
15
internal/docsite/testdata/clean/docs/extras/faq.md
vendored
Normal file
15
internal/docsite/testdata/clean/docs/extras/faq.md
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
---
|
||||
title: FAQ
|
||||
description: "Questions about the demo."
|
||||
section: extras
|
||||
order: 20
|
||||
---
|
||||
# FAQ
|
||||
|
||||
## Does it migrate
|
||||
|
||||
Yes, run `./bin/demo migrate`, then `summer docs:sync` after a source change.
|
||||
|
||||
```text
|
||||
summer not:checked in a text fence
|
||||
```
|
||||
18
internal/docsite/testdata/clean/docs/extras/usage.md
vendored
Normal file
18
internal/docsite/testdata/clean/docs/extras/usage.md
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
---
|
||||
title: Usage
|
||||
description: "Build a greeter and call it."
|
||||
section: extras
|
||||
order: 10
|
||||
---
|
||||
# Usage
|
||||
|
||||
## Call it
|
||||
|
||||
A `demo.Greeter` greets by name:
|
||||
|
||||
```go src=modules/demo/demo_test.go#greet
|
||||
g := Greeter{Name: "blog"}
|
||||
got := g.Greet()
|
||||
```
|
||||
|
||||
See [Greet someone](../guide/start.md#greet-someone).
|
||||
20
internal/docsite/testdata/clean/docs/guide/config.md
vendored
Normal file
20
internal/docsite/testdata/clean/docs/guide/config.md
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
---
|
||||
title: Config
|
||||
description: "Configure the demo database."
|
||||
section: guide
|
||||
order: 20
|
||||
---
|
||||
# Config
|
||||
|
||||
The database block of `config/app.yaml`:
|
||||
|
||||
```yaml src=config/app.yaml#db
|
||||
db:
|
||||
host: localhost
|
||||
port: 5432
|
||||
```
|
||||
|
||||
## Settings
|
||||
|
||||
> [!WARNING]
|
||||
> Keep the port in step with the database server.
|
||||
32
internal/docsite/testdata/clean/docs/guide/start.md
vendored
Normal file
32
internal/docsite/testdata/clean/docs/guide/start.md
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
title: Start
|
||||
description: "Install the demo and greet someone."
|
||||
section: guide
|
||||
order: 10
|
||||
---
|
||||
# Start
|
||||
|
||||
The demo module greets people.
|
||||
|
||||
## Install
|
||||
|
||||
Build the docs with `summer docs:build`, or run the application:
|
||||
|
||||
```sh
|
||||
$ summer docs:build --out site
|
||||
./bin/demo serve --addr 127.0.0.1:8080
|
||||
```
|
||||
|
||||
## Greet someone
|
||||
|
||||
Call `demo.Hello`:
|
||||
|
||||
```go src=modules/demo/example_test.go#ExampleHello
|
||||
fmt.Println(demo.Hello("blog"))
|
||||
// Output: Hello, blog
|
||||
```
|
||||
|
||||
> [!TIP]
|
||||
> The [demo reference](../../modules/demo/README.md#usage) lists the whole API.
|
||||
|
||||
Continue with [configuration](config.md) or jump back to [install](#install).
|
||||
12
internal/docsite/testdata/clean/docs/index.md
vendored
Normal file
12
internal/docsite/testdata/clean/docs/index.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
---
|
||||
title: Demo docs
|
||||
description: "The landing page of the clean fixture."
|
||||
section: index
|
||||
order: 0
|
||||
---
|
||||
# Demo docs
|
||||
|
||||
Start with the [start guide](guide/start.md), then read [usage](extras/usage.md#call-it).
|
||||
|
||||
> [!NOTE]
|
||||
> Every page of this fixture passes every check.
|
||||
14
internal/docsite/testdata/clean/docs/site.yaml
vendored
Normal file
14
internal/docsite/testdata/clean/docs/site.yaml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
title: Demo
|
||||
description: "Demo is the clean docs checker fixture."
|
||||
base_url: ""
|
||||
edit_url: "https://forge.example/edit/{path}"
|
||||
source_url: "https://forge.example/src/{path}"
|
||||
llms_notes:
|
||||
- "Every page of this fixture passes every check."
|
||||
sections:
|
||||
- name: guide
|
||||
title: Guide
|
||||
- name: extras
|
||||
title: Extras
|
||||
- name: api
|
||||
title: API reference
|
||||
Reference in New Issue
Block a user