Skip to content

Validation

Validate Confluence pages before pushing to catch errors early.

  • Initialized sync directory with .atlcli/ folder
  • Local markdown files to validate

atlcli validates your local markdown files to detect issues before pushing to Confluence:

  • Broken internal links
  • Unclosed macro blocks
  • Page size warnings
  • Folder structure issues

Run validation on a sync directory:

Terminal window
atlcli wiki docs check ./docs

Output:

Checking 24 files...
getting-started.md
line 45: ERROR - Broken link to "./setup.md" [LINK_FILE_NOT_FOUND]
api-reference.md
line 12: ERROR - Unclosed macro ":::info" starting at line 12 [MACRO_UNCLOSED]
large-guide.md
WARNING - Page size (485KB) exceeds 500KB limit [PAGE_SIZE_EXCEEDED]
Summary: 2 errors, 1 warning in 3 files (21 passed)
FlagDescription
--strictTreat warnings as errors (exit code 1 for warnings)
--jsonOutput results as JSON

Checks that internal links resolve to existing files:

[Valid Link](./existing-page.md) ✓ File exists
[Broken Link](./missing-page.md) ✗ LINK_FILE_NOT_FOUND
[Untracked](./new-page.md) ⚠ LINK_UNTRACKED_PAGE (warning)
CodeSeverityDescription
LINK_FILE_NOT_FOUNDErrorTarget file does not exist
LINK_UNTRACKED_PAGEWarningTarget file exists but has no page ID in frontmatter

Checks that macro blocks are properly closed:

::: info
This panel is properly closed.
::: ✓ Valid
::: warning
This panel is never closed... ✗ MACRO_UNCLOSED
CodeSeverityDescription
MACRO_UNCLOSEDErrorMacro opened with :::name but no closing :::

Warns when page content exceeds 500KB:

CodeSeverityDescription
PAGE_SIZE_EXCEEDEDWarningPage content exceeds 500KB

Checks folder structure for issues:

CodeSeverityDescription
FOLDER_EMPTYWarningFolder index.md exists but has no child pages
FOLDER_MISSING_INDEXWarningDirectory contains .md files but no index.md

Use --strict to fail on warnings (useful in CI):

Terminal window
atlcli wiki docs check ./docs --strict

Exit codes:

  • 0 - No errors (and no warnings in strict mode)
  • 1 - Errors found (or warnings in strict mode)
Terminal window
atlcli wiki docs check ./docs --json

Use the --validate flag with push to run checks before pushing:

Terminal window
atlcli wiki docs push ./docs --validate
atlcli wiki docs push ./docs --validate --strict # Fail on warnings
- name: Validate Confluence docs
run: atlcli wiki docs check ./docs --strict
validate-docs:
script:
- atlcli wiki docs check ./docs --strict
allow_failure: false
.git/hooks/pre-commit
#!/bin/bash
if git diff --cached --name-only | grep -q "^docs/"; then
atlcli wiki docs check ./docs --strict
fi
Terminal window
atlcli wiki docs check ./docs/api-reference.md
Terminal window
atlcli wiki docs check ./docs --strict && atlcli wiki docs push ./docs
  • Sync - Run validation before push with --validate
  • Macros - Supported macro syntax
  • Audit - Content health analysis beyond validation
Jira and Confluence are trademarks of Atlassian Corporation Plc. atlcli is not affiliated with, endorsed by, or sponsored by Atlassian.