feat: improve styles: Credo fixes, git pre-push hook - #24
Conversation
- Fix typing violations in enforcer.ex and enforcer_server.ex by removing impossible pattern matches for error tuples - Fix git_hooks configuration to only apply in dev environment - Fix doctest failure by sorting map output for consistent ordering - Update charlists to use ~c sigil to resolve deprecation warnings
There was a problem hiding this comment.
Pull Request Overview
This PR applies Credo style fixes across the codebase and adds a git pre-push hook for automated code quality checks. The changes align the code with Elixir best practices and ensure consistent formatting.
- Addresses Credo lint warnings including function parentheses, alias ordering, and charlist syntax updates
- Adds git pre-push hook configuration to run Credo and format checks automatically
- Updates Elixir/Erlang versions and dependency versions
Reviewed Changes
Copilot reviewed 28 out of 29 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| test/support/mock_repo.ex | Added moduledoc, reordered aliases, fixed function call parentheses |
| test/persist/* | Reordered aliases, improved multiline formatting, fixed function calls |
| test/model/* | Reordered aliases alphabetically |
| test/enforcer/* | Removed trailing comma, reordered aliases |
| mix.exs | Updated ecto_sql version, added credo and git_hooks dependencies |
| lib/acx/persist/* | Added moduledocs, improved formatting, fixed function calls |
| lib/acx/model/* | Updated charlist syntax, improved comments |
| lib/acx/internal/* | Updated charlist syntax, simplified error handling |
| lib/acx/* | Added moduledocs, improved formatting and function signatures |
| config/config.exs | Added git hooks configuration for pre-push checks |
| .tool-versions | Updated Elixir/Erlang versions |
| .credo.exs | Added comprehensive Credo configuration |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@ngoclinhng please review |
- Fix token format in matcher.ex from charlist to string - Add proper error handling in enforcer_server for remove_filtered_policy and set_persist_adapter - Fix remove_filtered_policy! to properly raise exceptions on errors - Update remove_filtered_policy to handle adapter errors correctly - Resolve all compiler type warnings Co-Authored-By: Claude <noreply@anthropic.com>
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 28 out of 29 changed files in this pull request and generated no new comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
# [1.1.0](v1.0.0...v1.1.0) (2025-10-12) ### Features * improve styles: Credo fixes, git pre-push hook ([#24](#24)) ([e74ea15](e74ea15))
|
🎉 This PR is included in version 1.1.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.