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: 0 additions & 2 deletions docs/format.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ conventions. Just as code-formatters like
`fmt` command to format schemas based on industry-standard conventions and to
check their adherence on a continuous integration environment.

**This command does not support YAML schemas yet.**

Examples
--------

Expand Down
11 changes: 4 additions & 7 deletions docs/lint.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,10 @@ automatically fix many of them.
> rest of the description. If you are working with JSON Schema for API
> specifications, you should make use of both linters together!

**The `--fix/-f` option is not supported when passing YAML schemas.**

**The `--format/-m` option requires `--fix/-f` to be set and is not supported
for YAML schemas.** When `--format/-m` is set, the output file is always
written with proper formatting (equivalent to running `fmt`), even if there
are no lint issues to fix. Use `--keep-ordering/-k` with `--format/-m` to
preserve key ordering during formatting.
When `--format/-m` is set, the output file is always written with proper
formatting (equivalent to running `fmt`), even if there are no lint issues to
fix. Use `--keep-ordering/-k` with `--format/-m` to preserve key ordering
during formatting.
Comment on lines +42 to +45

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2: --format/-m still rejects invocations without --fix/-f, so this paragraph implies formatting works standalone. Restore the prerequisite before describing its formatting behavior.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/lint.markdown, line 42:

<comment>`--format/-m` still rejects invocations without `--fix/-f`, so this paragraph implies formatting works standalone. Restore the prerequisite before describing its formatting behavior.</comment>

<file context>
@@ -39,13 +39,10 @@ automatically fix many of them.
-written with proper formatting (equivalent to running `fmt`), even if there
-are no lint issues to fix. Use `--keep-ordering/-k` with `--format/-m` to
-preserve key ordering during formatting.
+When `--format/-m` is set, the output file is always written with proper
+formatting (equivalent to running `fmt`), even if there are no lint issues to
+fix. Use `--keep-ordering/-k` with `--format/-m` to preserve key ordering
</file context>
Suggested change
When `--format/-m` is set, the output file is always written with proper
formatting (equivalent to running `fmt`), even if there are no lint issues to
fix. Use `--keep-ordering/-k` with `--format/-m` to preserve key ordering
during formatting.
The `--format/-m` option requires `--fix/-f`; when set, the output file is always written with proper
formatting (equivalent to running `fmt`), even if there are no lint issues to
fix. Use `--keep-ordering/-k` with `--format/-m` to preserve key ordering
during formatting.


> [!NOTE]
> There are linting rules that require compiling and validating instance
Expand Down
Loading