Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update formatting #1909

Merged
merged 1 commit into from
Jan 28, 2025
Merged
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
16 changes: 15 additions & 1 deletion website/docs/guides/formatting.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Files that had already been in a correct format will not be emitted.
This may be useful for integrating with some external tools.

You can choose packages to format with `--package / --workspace` arguments.
When formatting a package, all cairo files in package root and directories below will be formatted (not only the `src/*` directory).
When formatting a package, all cairo files in package root and directories below will be formatted (not only the `src/*`
directory).

## Formatting options

Expand Down Expand Up @@ -58,3 +59,16 @@ You can create multiple ignore files on different levels of your directory struc
`.gitignore` files.

Additionally, files ignored by the `.gitignore` files will be omitted as well.

## Ignoring lines

Mark statements or expressions with `#[cairofmt::skip]` attribute to omit them during formatting. See example below:

```cairo
#[cairofmt::skip]
let a = array![
1,
2,
3
];
```
Loading