Skip to content

Commit 61227a9

Browse files
committed
chore: add codex config
1 parent 1574159 commit 61227a9

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

.codex/config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
project:
2+
name: apix_schema
3+
language: elixir
4+
5+
tools:
6+
test:
7+
command: mix test
8+
env:
9+
MIX_ENV: test
10+
coverage:
11+
command: mix test --cover
12+
env:
13+
MIX_ENV: test
14+
15+
style:
16+
formatting:
17+
- Run `mix format` before committing formatting changes and keep Elixir-style indentation.
18+
- Skim nearby code to mirror existing codestyle (naming, layout, spacing) before adding new code or tests.
19+
testing:
20+
- Tests should build AST structs explicitly when asserting normalizations instead of relying on helpers.
21+
- Prefer inline pattern-matching assertions (with pinned values) over comparing structs via helper functions.
22+
- Prefer pattern-matching directly on function results instead of extracting values for separate assertions.
23+
- Prefer pattern-matching assertions in general.
24+
- Keep schema specs explicit (e.g., describe module names, parameter lists) so `Apix.Schema` contexts remain readable.
25+
- When adding or changing tests, verify coverage (for example with `mix test --cover`) to confirm the desired branches are exercised.
26+
- In doctests/describe/test strings that name a module, interpolate via `"#{inspect Module}"` so tooling can locate the reference.
27+
- Name tests after the function being exercised (e.g., `prewalk/2`, `equals?/2`) and focus each test on one function.
28+
29+
notes:
30+
- The project uses `Apix.Schema.Case` with a setup that clears the `TypeGraph`.
31+
- Normalization tests should keep the AST shapes obvious to cover every branch (double negation, identity, absorption, idempotence, compact, nil-expansion).
32+
- After running coverage, consult corresponding `cover/<modulename>.html` artifacts to verify uncovered lines.
33+
- Single-test coverage runs (e.g., `mix test --cover test/specific_test.exs`) treat all other modules as 0%; for accurate numbers either run `mix test --cover` or parse the coverage table/HTML for the modules exercised.

0 commit comments

Comments
 (0)