Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,8 @@ npx -y spacesheep@latest skills lint --json # for CI: exits 1 when the fold
- **A repo holds one skill**, in a top-level folder named for it (`my-skill/SKILL.md`). The repo's own
files (README, LICENSE, `.github/`) never enter a version.
- **In a git repo** it checks what a commit would hold, so files git ignores are left out.
- **`docs/` is read as the skill page's Docs tab reads it**: a page `docs/SUMMARY.md` links that isn't there,
and a page it leaves out, are warnings, never a refusal.
- **Well-formed isn't accepted.** What `spacesheep.yaml` declares the skill may ask for (scopes, triggers,
tools, outside hosts), and a review of what the skill holds, are checked by Spacesheep when it takes
the release.
Expand Down
61 changes: 59 additions & 2 deletions lib/skill-check.gen.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "spacesheep",
"version": "1.42.0",
"version": "1.43.0",
"description": "Publish web pages to spacesheep.dev from a terminal or CI: `npx spacesheep deploy ./dist`",
"bin": {
"spacesheep": "./bin/spacesheep.js"
Expand Down
14 changes: 14 additions & 0 deletions test/skill-lint.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,20 @@ test("the repo's CHANGELOG.md is held to Keep a Changelog 1.1, with its tags: wa
]);
});

test("docs/ is checked as the Docs tab reads it: SUMMARY.md's dead links and pages it leaves out are warnings", () => {
const root = write({
...skill(),
"my-skill/docs/index.md": "# Start\n", "my-skill/docs/extra.md": "# Extra\n",
"my-skill/docs/SUMMARY.md": "# Summary\n\n- [Start](index.md)\n- [Gone](gone.md)\n",
});
const c = lint(root);
assert.strictEqual(c.ok, true, c.problems.join("; "));
assert.deepStrictEqual(c.warnings.filter((w) => w.startsWith("docs/")), [
"docs/SUMMARY.md links gone.md, which isn't in the folder: Docs skips it",
"docs/extra.md isn't in docs/SUMMARY.md, so Docs doesn't show it (it's still in Files)",
]);
});

test("the three refusals are the import's words, and refuse", () => {
const none = lint(write({ "README.md": "# Nothing\n", "docs/a.md": "a\n" }));
assert.deepStrictEqual([none.ok, none.problems], [false, [SAID.none]]);
Expand Down