# 11.4.3 forc-check

Check the current or target project and all of its dependencies for errors.

检查当前或目标项目及所有依赖是否有错误。

This will essentially compile the packages without performing the final step of code generation, which is faster than running forc build.

这实际上将编译包而不执行代码生成的最后一步，这比运行 forc build 更快。

### 用法(USAGE):

forc check \[OPTIONS] \[BUILD\_TARGET]

### 参数(ARGS):

<*BUILD\_TARGET*> Build target to use for code generation\
<*BUILD\_TARGET*> 构建用于代码生成的目标

\[default: fuel] \[possible values: fuel, evm, midenvm]\
\[默认值：fuel] \[可能值：fuel、evm、midenvm]

### 选项 (OPTIONS):

`--disable-tests`

Disable checking unit tests\
禁用检查单元测试

`-h`, `--help`

Print help information\
打印帮助信息

`-L`, `--log-level` <*LOG\_LEVEL*>

Set the log level\
设置日志级别

`--locked`

Requires that the Forc.lock file is up-to-date. If the lock file is missing, or it needs to be updated, Forc will exit with an error

要求 Forc.lock 文件是最新的。如果锁定文件丢失，或者需要更新，Forc 将退出并出现错误

`--offline`

Offline mode, prevents Forc from using the network when managing dependencies. Meaning it will only try to use previously downloaded dependencies

离线模式可防止 Forc 在管理依赖项时使用网络。这意味着它只会尝试使用以前下载的依赖

`-p`, `--path` <*PATH*>

Path to the project, if not specified, current working directory will be used

项目路径，如果未指定，将使用当前工作目录

`-s`, `--silent`

Silence all output

静音(禁止)所有输出

`-t`, `--terse`

Terse mode. Limited warning and error output\
简洁模式。有限的警告和错误输出

`-v`, `--verbose`

Use verbose output\
使用详细输出


---

# Agent Instructions: 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:

```
GET https://zenofchain.gitbook.io/sway-bian-cheng-yu-yan-geng-xin-zhong-the-sway-programming-languageupdatin/11.-forc-yin-yong-forc-reference/11.4-ming-ling-commands/11.4.3-forc-check.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
