Update dependencies

phoenix_live_reload 1.6.0 => 1.6.1
tidewave 0.4.1 => 0.4.2
usage_rules 0.1.23 => 0.1.24
This commit is contained in:
Claudio Ortolina
2025-09-01 11:56:11 +03:00
parent bbdf91e73a
commit 66f8bdd895
2 changed files with 6 additions and 5 deletions
+3 -2
View File
@@ -302,6 +302,7 @@ mix usage_rules.search_docs "Enum.zip" --query-by title
## Pattern Matching
- Use pattern matching over conditional logic when possible
- Prefer to match on function heads instead of using `if`/`else` or `case` in function bodies
- `%{}` matches ANY map, not just empty maps. Use `map_size(map) == 0` guard to check for truly empty maps
## Error Handling
- Use `{:ok, result}` and `{:error, reason}` tuples for operations that can fail
@@ -324,7 +325,7 @@ mix usage_rules.search_docs "Enum.zip" --query-by title
- Use guard clauses: `when is_binary(name) and byte_size(name) > 0`
- Prefer multiple function clauses over complex conditional logic
- Name functions descriptively: `calculate_total_price/2` not `calc/2`
- Predicate function names should not start with `is` and should end in a question mark.
- Predicate function names should not start with `is` and should end in a question mark.
- Names like `is_thing` should be reserved for guards
## Data Structures
@@ -364,7 +365,7 @@ mix usage_rules.search_docs "Enum.zip" --query-by title
## Process Communication
- Use `GenServer.call/3` for synchronous requests expecting replies
- Use `GenServer.cast/2` for fire-and-forget messages.
- When in doubt, us `call` over `cast`, to ensure back-pressure
- When in doubt, use `call` over `cast`, to ensure back-pressure
- Set appropriate timeouts for `call/3` operations
## Fault Tolerance