Skip to content

feat: improve styles: Credo fixes, git pre-push hook - #24

Merged
hsluoyz merged 4 commits into
apache:masterfrom
EnthuZiastic:master
Oct 12, 2025
Merged

feat: improve styles: Credo fixes, git pre-push hook#24
hsluoyz merged 4 commits into
apache:masterfrom
EnthuZiastic:master

Conversation

@tispratik

Copy link
Copy Markdown
Contributor

No description provided.

@CLAassistant

CLAassistant commented Sep 29, 2025

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@tispratik tispratik changed the title Credo fixes, git pre-push hook style: Credo fixes, git pre-push hook Sep 29, 2025
- 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
@hsluoyz
hsluoyz requested a review from Copilot September 29, 2025 17:10
@hsluoyz hsluoyz changed the title style: Credo fixes, git pre-push hook feat: improve styles: Credo fixes, git pre-push hook Sep 29, 2025

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread lib/acx/model/matcher.ex Outdated
Comment thread lib/acx/enforcer_server.ex Outdated
Comment thread lib/acx/enforcer_server.ex
Comment thread lib/acx/enforcer.ex Outdated
@hsluoyz

hsluoyz commented Sep 29, 2025

Copy link
Copy Markdown
Member

@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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@hsluoyz hsluoyz closed this Oct 12, 2025
@hsluoyz hsluoyz reopened this Oct 12, 2025
@hsluoyz
hsluoyz merged commit e74ea15 into apache:master Oct 12, 2025
3 checks passed
github-actions Bot pushed a commit that referenced this pull request Oct 12, 2025
# [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))
@github-actions

Copy link
Copy Markdown

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants