> ## Documentation Index
> Fetch the complete documentation index at: https://docs.trunk.io/llms.txt
> Use this file to discover all available pages before exploring further.

# pragma-once

> pragma-once is a linter for C, C++

[**pragma-once**](https://github.com/trunk-io/plugins/blob/main/linters/pragma-once/README.md) is a linter for C, C++.

You can enable the pragma-once linter with:

```shell theme={null}
trunk check enable pragma-once
```

<Frame caption="pragma-once example output">
  <img src="https://mintcdn.com/trunk-4cab4936/WAR0qJ1WO0rtUlqz/assets/code-quality/overview/linters/supported/pragma-once.gif?s=21519bdf48237a0955bd0857de0e0f9f" alt="pragma-once example output" width="1000" height="600" data-path="assets/code-quality/overview/linters/supported/pragma-once.gif" />
</Frame>

## Auto Enabling

pragma-once will never be auto-enabled. It must be enabled manually.

## Links

* [pragma-once site](https://github.com/trunk-io/plugins/blob/main/linters/pragma-once/README.md)
* pragma-once Trunk Code Quality [integration source](https://github.com/trunk-io/plugins/tree/main/linters/pragma-once)
* Trunk Code Quality's [open source plugins repo](https://github.com/trunk-io/plugins/tree/main)
