Skip to content

docs: document check.rules configuration for fern check#4627

Merged
devalog merged 3 commits intomainfrom
fern/document-check-rules
Mar 31, 2026
Merged

docs: document check.rules configuration for fern check#4627
devalog merged 3 commits intomainfrom
fern/document-check-rules

Conversation

@fern-api
Copy link
Copy Markdown
Contributor

@fern-api fern-api bot commented Mar 30, 2026

Summary

Documents the check.rules configuration for docs.yml, added in CLI v4.46.0.

Changes:

  • commands.mdx: Marks --strict-broken-links (and --broken-links) as deprecated with a warning callout pointing to the new check.rules approach. Adds a "Configuring rule severity" subsection with a short example and link to the full reference.
  • site-level-settings.mdx: Adds a new "Check configuration" section documenting all six configurable rules (broken-links, example-validation, no-non-component-refs, valid-local-references, no-circular-redirects, valid-docs-endpoints) with their types, defaults, and descriptions.

Review & Testing Checklist for Human

  • Verify rule names match CLI: The documented kebab-case rule names (e.g., broken-links, example-validation) must match what fern check actually accepts in docs.yml. The TypeScript types use camelCase (brokenLinks, exampleValidation) — confirm the YAML serialization layer converts correctly.
  • Verify default values are accurate: Cross-check documented defaults (e.g., broken-links: error, valid-local-references: warn) against the actual CLI behavior.
  • Check cross-page anchor link: The link /learn/docs/configuration/site-level-settings#check-configuration in commands.mdx should resolve to the new section on the site-level settings page. Verify via preview.
  • Preview rendered pages: Review both changed pages in the docs preview to confirm formatting, ParamField rendering, and YAML code block display.

Recommended test plan: Open the preview links and visually verify both pages render correctly — especially the ParamField components and the deprecation warning callout.

Notes

  • The run CI job failed on the first commit due to escaped quotes (\") in MDX type attributes. Fixed in a follow-up commit by switching to single quotes ('warn' | 'error'), matching the existing pattern used elsewhere in site-level-settings.mdx.
  • The old --strict-broken-links documentation is preserved (not deleted) but marked deprecated, so existing users searching for it will find the migration path.

Link to Devin session: https://app.devin.ai/sessions/03d07fb7ea8646ee84749db18f2f0855

@fern-api fern-api bot requested a review from devalog as a code owner March 30, 2026 16:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 30, 2026

@fern-api
Copy link
Copy Markdown
Contributor Author

fern-api bot commented Mar 30, 2026

Requested by: jon
Slack thread: View conversation


## Configure `fern check` rule severity

You can now configure the severity of validation rules run by `fern check` directly in your `docs.yml` file using the `check.rules` property. Set individual rules to `"warn"` (non-blocking) or `"error"` (blocking) to control which checks fail your build.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated

example-validation: warn
```

The `--broken-links` and `--strict-broken-links` CLI flags are now deprecated in favor of this configuration.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Current] Avoid time-relative terms like 'now' that become outdated

@devalog devalog merged commit 514f32c into main Mar 31, 2026
2 checks passed
@devalog devalog deleted the fern/document-check-rules branch March 31, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant