ワンクリックで
code-style
The general coding style for the project. This includes the general API design guide and acceptance criterias
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
The general coding style for the project. This includes the general API design guide and acceptance criterias
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
Write or update focused unit tests in the Pernix compiler codebase. Use when adding Rust test functions, covering a bug or feature with unit tests, or reviewing test clarity. Apply concise input, premise, and output contract comments especially to tests for pernixc_type and pernixc_solver; inspect and follow local conventions in other crates.
The general approach for end to end testing in the project. Especially, when adding new features or diagnostics.
Workflow for creating and updating syntax trees in the `pernixc_syntax` crate, including the `abstract_tree` macro pattern and the arbitrary module for property-based testing.
SOC 職業分類に基づく
| name | code-style |
| description | The general coding style for the project. This includes the general API design guide and acceptance criterias |
Rationale: This hides the implementation details as well as allows us to change the object construction logic without breaking the API.
Don't Expose getters to the internal object just to allow users to call
methods on it (e.g. get_generic_parameters().get_parameter("T")).
Rationale: To reduce as much exposure of the internal object as possible. This allows us to change the internal object without breaking the API. It also allows us to add additional logic in the delegation method if needed (e.g. error handling, logging, etc.).
matchDon't Use wildcard matching in match statements (e.g. match x { _ => ... }) for our own created enums (of course, it's fine to use it for external enums
that we don't control).
Rationale: This makes the compiler helps notify us when there's a new variant added to the enum and where we need to handle it.
Interned::new_duplicating or Interned::new_duplicating_unsized in the main codebaseRationale: The main purpose of Interned is to deduplicate data and save
memory. Using Interned::new_duplicating* always allocates new memory and
doesn't deduplicate anything. It's fine to use it in tests or benchmarks where we don't care about memory usage.
cargo clippyRationale: Clippy can catch many common programming mistakes. And the CI will fail if there are any warnings from Clippy, so it's better to run it locally before pushing code.
cargo +nightly fmtRationale: Make the code looks consistent. Again, the CI will fail if the code is not formatted properly.