Skip to content

Require an explicit path for in-place formatting - #49

Merged
t-kalinowski merged 64 commits into
mainfrom
fix/require-format-path
Dec 5, 2026
Merged

t-kalinowski merged 64 commits into
mainfrom
fix/require-format-path

Conversation

@t-kalinowski

@t-kalinowski t-kalinowski commented Dec 4, 2026 •

Copy link
Copy Markdown
Member

Running yamark format with no arguments could rewrite an entire directory tree, including untracked files. It now shows the same help as yamark format --help and exits successfully.

To format the current directory in place, use yamark format .. In-place formatting requires a file or directory argument even when a yamark.toml is present. The CLI rejects invocations such as yamark format --wrap 40 with a missing-path error and exit status 2.

Use yamark format --check . to check the same files or yamark format --diff . to preview changes. Both still default to the current directory when the path is omitted. --stdin-file-path still accepts input on stdin.

Closes #48.

@t-kalinowski
t-kalinowski marked this pull request as draft December 4, 2026 14:28
@t-kalinowski
t-kalinowski marked this pull request as ready for review December 4, 2026 21:28
@t-kalinowski

Copy link
Copy Markdown
Member Author

No findings found by gpt-6.2-astra with reasoning effort max

Reviewed commit: 61dcf04642d1e55b5aebee8bfd6a20a8aea3d69e.

@t-kalinowski

Copy link
Copy Markdown
Member Author

No findings found by gpt-6.2-astra with reasoning effort max

Reviewed commit: f9fc46c51c656216f9a0437fd38060192a855e39.

@t-kalinowski

Copy link
Copy Markdown
Member Author

No findings found by gpt-6.2-astra with reasoning effort max

Reviewed commit: 4f8abb29b69754d7b802c0c1cb123c9ef898f11e.

@t-kalinowski

Copy link
Copy Markdown
Member Author

No findings found by gpt-6.2-astra with reasoning effort max

Reviewed commit: 4f8abb29b69754d7b802c0c1cb123c9ef898f11e.

@t-kalinowski
t-kalinowski merged commit 9b7e7fc into main Dec 5, 2026
5 of 6 checks passed
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.

Automatic file edits with yamark format are dangerous

1 participant