From 1e3870058dfa9e3c8b137d4d2cbdf8a6962a7385 Mon Sep 17 00:00:00 2001 From: Zhang ShengYan Date: Mon, 18 Nov 2024 10:49:25 +0800 Subject: [PATCH] chore: add doc of skip-lint --- docs/src/pages/docs/the-accounts-struct.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/src/pages/docs/the-accounts-struct.md b/docs/src/pages/docs/the-accounts-struct.md index 7b0acce7ff..56ca9f054c 100644 --- a/docs/src/pages/docs/the-accounts-struct.md +++ b/docs/src/pages/docs/the-accounts-struct.md @@ -173,6 +173,23 @@ pub struct Initialize<'info> { The doc comment needs to be a [line or block doc comment](https://doc.rust-lang.org/reference/comments.html#doc-comments) (/// or /\*\*) to be interpreted as doc attribute by Rust. Double slash comments (//) are not interpreted as such. {% /callout %} +#### Disabling safety checks + +For purposes like quick prototyping, you can disable the safety checks by appending the `--skip-lint` option to Anchor CLI commands: + +```bash +anchor build --skip-lint +# or +anchor test --skip-lint +``` + +Or, you can disable the safety checks globally by setting `skip-lint` to `true` in the `[features]` section of your `Anchor.toml` file. + +```toml +[features] +skip-lint = true +``` + ## Other Resources - [Solana Cookbook](https://solanacookbook.com/core-concepts/accounts.html)