turbo-editors/turbo-corepublic Fork 0
v0.9.0
Commits
Clone
git clone https://git.rickub.com/turbo-editors/turbo-core.git
git clone ssh://git@rickub.com/turbo-editors/turbo-core.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

🛟 Updated. 28d5985 · on v0.9.0 · k33g · 11h ago
2026-09-01-more-syntaxes.md · 43 lines · 3.2 KBmarkdown
Blame HistoryOpen raw

Handoff — 2026-09-01 — Dockerfile, compose, YAML and XML colouring (ticket 8)

State

Ticket 8 is implemented and verified, in all three repositories, on the branch feature/more-syntaxes. Nothing is committed.

turbo-core now colours eight languages. Three scanners were added:

  • syntax/yaml.go, syntax/yaml_block.go, syntax/yaml_key.go — one YAML scanner serving compose files, Kubernetes manifests and CI workflows alike.
  • syntax/dockerfile.go — instructions matched in any case, --flags, $VAR/${VAR}, the trailing \, and the parser directives as comments.
  • syntax/xml.go — its own scanner rather than HTML's, because of CDATA.

Definition gained Filenames []string, and LanguageOf a name step between the extension and the shebang. That is the only change to an existing API, and it is additive.

Suite green in all three; quality gate PASS 0/0/0 in all three (turbo-core complexity 1718, turbo-go 37, turbo-rust 98). Documentation is complete in EN and FR in all three, and syntax/README.md is in sync.

In flight

Nothing half-done. The work stops at the commit.

Next steps

  1. Review and commit on feature/more-syntaxes in all three repositories, merge to main.
  2. Release turbo-core v0.2.0Definition.Filenames and the three new Language constants are new public API, so it is a minor bump:
    TAG=v0.2.0 ./01-release.tag.sh
    TAG=v0.2.0 ./02-release.publish.sh
    
  3. In each editor, go mod tidy to write the v0.2.0 checksum into go.sum, then make check. Until step 2 is done, neither editor builds — their go.mod already requires v0.2.0 and go.sum has no entry for it. The error names it exactly: missing go.sum entry for module providing package codeberg.org/turbo-editors/turbo-core/app.

Open questions / blockers

  • Only the release. Nothing is waiting on a decision.

Watch out for

  • A YAML colon is a separator only when a space or the end of the line follows it. Anybody "simplifying" that rule will put every image: nginx:1.27 and every URL back into three colours. There is a test that walks every column of the span; do not weaken it into a spot check.
  • The Dockerfile scanner keeps : in a word for the same reason — golang:1.26-alpine is one thing. dockerfileWordRunes is where that lives.
  • A YAML block scalar has no closing delimiter. Its extent is the indentation the first content line set, and a blank line inside one stays inside it. Ending at the first blank line looks reasonable and cuts a shell script in a CI file in half.
  • XML carries which construct is open, not a flag. A single boolean closes a CDATA section on a --> that happens to be inside it.
  • An empty stem must match nothing. .gitignore is all extension; if the stem rule accepts an empty stem it becomes a wildcard and every dotfile becomes a Dockerfile.
  • The quality gate found four smells in the first version of these scanners — three qlty:boolean-logic from inline rune comparisons, one qlty:file-complexity on yaml.go. The fix was named constants and three files; keep new scanners in that shape rather than one long switch.
  • release.env and turbo-core.token.env hold live Codeberg tokens and are covered by *.env in .gitignore. Keep it that way.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Handoff — 2026-09-01 — Dockerfile, compose, YAML and XML colouring (ticket 8)

## State

Ticket 8 is **implemented and verified**, in all three repositories, on the branch `feature/more-syntaxes`. Nothing is committed.

turbo-core now colours **eight** languages. Three scanners were added:

- `syntax/yaml.go`, `syntax/yaml_block.go`, `syntax/yaml_key.go` — one YAML scanner serving compose files, Kubernetes manifests and CI workflows alike.
- `syntax/dockerfile.go` — instructions matched in any case, `--flags`, `$VAR`/`${VAR}`, the trailing `\`, and the parser directives as comments.
- `syntax/xml.go` — its own scanner rather than HTML's, because of CDATA.

`Definition` gained `Filenames []string`, and `LanguageOf` a name step between the extension and the shebang. That is the only change to an existing API, and it is additive.

Suite green in all three; quality gate **PASS 0/0/0** in all three (turbo-core complexity 1718, turbo-go 37, turbo-rust 98). Documentation is complete in EN and FR in all three, and `syntax/README.md` is in sync.

## In flight

Nothing half-done. The work stops at the commit.

## Next steps

1. Review and commit on `feature/more-syntaxes` in all three repositories, merge to `main`.
2. **Release turbo-core v0.2.0**`Definition.Filenames` and the three new `Language` constants are new public API, so it is a minor bump:
   ```sh
   TAG=v0.2.0 ./01-release.tag.sh
   TAG=v0.2.0 ./02-release.publish.sh
   ```
3. In each editor, `go mod tidy` to write the v0.2.0 checksum into `go.sum`, then `make check`. **Until step 2 is done, neither editor builds** — their `go.mod` already requires v0.2.0 and `go.sum` has no entry for it. The error names it exactly: `missing go.sum entry for module providing package codeberg.org/turbo-editors/turbo-core/app`.

## Open questions / blockers

- Only the release. Nothing is waiting on a decision.

## Watch out for

- **A YAML colon is a separator only when a space or the end of the line follows it.** Anybody "simplifying" that rule will put every `image: nginx:1.27` and every URL back into three colours. There is a test that walks every column of the span; do not weaken it into a spot check.
- **The Dockerfile scanner keeps `:` in a word** for the same reason — `golang:1.26-alpine` is one thing. `dockerfileWordRunes` is where that lives.
- **A YAML block scalar has no closing delimiter.** Its extent is the indentation the first content line set, and a blank line inside one stays inside it. Ending at the first blank line looks reasonable and cuts a shell script in a CI file in half.
- **XML carries *which* construct is open, not a flag.** A single boolean closes a CDATA section on a `-->` that happens to be inside it.
- **An empty stem must match nothing.** `.gitignore` is all extension; if the stem rule accepts an empty stem it becomes a wildcard and every dotfile becomes a Dockerfile.
- **The quality gate found four smells in the first version** of these scanners — three `qlty:boolean-logic` from inline rune comparisons, one `qlty:file-complexity` on `yaml.go`. The fix was named constants and three files; keep new scanners in that shape rather than one long switch.
- `release.env` and `turbo-core.token.env` hold live Codeberg tokens and are covered by `*.env` in `.gitignore`. Keep it that way.