> For the complete documentation index, see [llms.txt](https://tollcraft.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://tollcraft.gitbook.io/docs/lints/lints.md).

# Lint Reference

This section provides detailed documentation for all lints supported by `soroban-cost-linter`.

{% hint style="info" %}
See the [Cost Rationale](/docs/concepts/cost_rationale.md) page for a full explanation of Soroban's metered resources and why each resource matters.
{% endhint %}

## Confidence / Impact Classification

Lints are classified per the [MVP roadmap](https://github.com/Tollcraft/soroban-cost-linter/tree/main/docs/roadmap_mvp.md#3-false-positive-mitigation-strategy):

| Classification                        | Default Level | Meaning                                                                               |
| ------------------------------------- | ------------- | ------------------------------------------------------------------------------------- |
| **High Confidence, High Impact**      | `deny`        | Pattern is unambiguous and always expensive. Fails CI by default.                     |
| **Medium Impact / Context-Dependent** | `warn`        | Pattern may be acceptable in small or bounded contexts. Does not block CI by default. |

## Storage Operations

| Lint                                                                                                                                | Default Severity | Catches                                     |
| ----------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ------------------------------------------- |
| [`soroban_storage_in_loop`](/docs/lints/lints/soroban_storage_in_loop.md)                                                           | `warn`           | Storage reads/writes inside loop bodies     |
| [`storage_write_without_read`](https://github.com/Tollcraft/soroban-cost-linter/tree/main/docs/lints/storage_write_without_read.md) | `warn`           | Storage writes without a corresponding read |
| [`map_insert_in_loop`](https://github.com/Tollcraft/soroban-cost-linter/tree/main/docs/lints/map_insert_in_loop.md)                 | `warn`           | `Map::insert` calls inside loops            |

## CPU/Compute

| Lint                                                                                                                                        | Default Severity | Catches                                                                                                                                |
| ------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
| [`unnecessary_host_function_call`](/docs/lints/lints/unnecessary_host_function_call.md)                                                     | `warn`           | `Ledger`, `Crypto`, `Prng`, `Events`, `Deployer` and `Env::current_contract_address` calls repeated inside loops with unchanged inputs |
| [`signature_verification_in_loop`](https://github.com/Tollcraft/soroban-cost-linter/tree/main/docs/lints/signature_verification_in_loop.md) | `warn`           | `ed25519_verify`/`secp256k1_recover`/`secp256r1_verify` calls inside loops                                                             |

## Memory

| Lint                                                                                                                            | Default Severity | Catches                                                                           |
| ------------------------------------------------------------------------------------------------------------------------------- | ---------------- | --------------------------------------------------------------------------------- |
| [`redundant_env_clone`](/docs/lints/lints/redundant_env_clone.md)                                                               | `warn`           | Unnecessary `.clone()` calls on `Env`                                             |
| [`inefficient_bytes_concat`](https://github.com/Tollcraft/soroban-cost-linter/tree/main/docs/lints/inefficient_bytes_concat.md) | `warn`           | Repeated `Bytes` concatenation in loops with unnecessary allocations              |
| [`bytes_append_in_loop`](/docs/lints/lints/bytes_append_in_loop.md)                                                             | `warn`           | Growth-method calls on `Bytes`/`Vec`/`Map` inside loops                           |
| [`excessive_vec_capacity`](https://github.com/Tollcraft/soroban-cost-linter/tree/main/docs/lints/excessive_vec_capacity.md)     | `warn`           | `Vec::with_capacity`/`.reserve`/`.reserve_exact` with a large, hard-coded literal |
| [`vec_where_slice_could_be_used`](/docs/lints/lints/vec_where_slice_could_be_used.md)                                           | `warn`           | `soroban_sdk::Vec` by value where a native slice would suffice                    |

## Symbol Operations

| Lint                                                                                                                                            | Default Severity | Catches                                                    |
| ----------------------------------------------------------------------------------------------------------------------------------------------- | ---------------- | ---------------------------------------------------------- |
| [`symbol_new_for_short_literal`](/docs/lints/lints/symbol_new_for_short_literal.md)                                                             | `warn`           | `Symbol::new` with short literal arguments                 |
| [`storage_key_construction_in_loop`](https://github.com/Tollcraft/soroban-cost-linter/tree/main/docs/lints/storage_key_construction_in_loop.md) | `warn`           | Loop-invariant `Symbol::new` key construction inside loops |

{% hint style="info" %}
Severities can be adjusted per-workspace via `budget.toml` — see the [Integration Guide](/docs/guides/integration.md).
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://tollcraft.gitbook.io/docs/lints/lints.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
