This is an Elixir library that recompiles Elixir code in its AST form.
Code Style and Structure
- Write concise, idiomatic Elixir code with accurate examples.
- Use functional programming patterns and leverage immutability.
- Prefer higher-order functions and recursion over imperative loops.
- Use pattern matching directly in function clauses when needed for control flow.
- Prefer patterns in function arguments over case statements.
- Prefer one-line function syntax with no blank lines in between when all clauses fit on one line.
- Use descriptive variable and function names (e.g., user_signed_in?, calculate_total).
- Sort aliases alphabetically.
- Don't add comments to the code unless explicitly asked for.
- Calls to defd should not have parentheses.
Tests
- Structure test files to mirror the directory structure of the code under test.
- Module names in test files must be unique.