> For the complete documentation index, see [llms.txt](https://book.bsdcn.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.bsdcn.org/port/di-10-zhang-ce-shi-port/10.4.portlint.md).

# 10.4.Portlint

在提交之前，请使用 [`portlint`](https://docs.freebsd.org/en/books/porters-handbook/quick-porting/#porting-portlint) 检查该 Port。`portlint` 会对许多常见的错误发出警告，包括功能性和风格上的问题。对于新 Port，`portlint -A` 是最全面的；对于现有 Port，`portlint -C` 足矣。

由于 `portlint` 使用启发式方法来检测错误，它可能会产生误报。此外，有时标记为问题的内容由于 Port 框架的限制，无法以其他方式解决。如果有疑问，最好的做法是向 [FreeBSD ports 邮件列表](https://lists.freebsd.org/subscription/freebsd-ports) 提问。


---

# 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://book.bsdcn.org/port/di-10-zhang-ce-shi-port/10.4.portlint.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.
