Skip to content

feat: [#821] Add WithFilters function#1279

Merged
hwbrzzl merged 2 commits intomasterfrom
bowen/#821
Dec 4, 2025
Merged

feat: [#821] Add WithFilters function#1279
hwbrzzl merged 2 commits intomasterfrom
bowen/#821

Conversation

@hwbrzzl
Copy link
Contributor

@hwbrzzl hwbrzzl commented Nov 30, 2025

📑 Description

Closes goravel/goravel#821

✅ Checks

  • Added test cases for my code

@codecov
Copy link

codecov bot commented Nov 30, 2025

Codecov Report

❌ Patch coverage is 75.47170% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 68.57%. Comparing base (d029a42) to head (897e68e).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
packages/match/helper.go 0.00% 13 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1279   +/-   ##
=======================================
  Coverage   68.56%   68.57%           
=======================================
  Files         264      264           
  Lines       15566    15611   +45     
=======================================
+ Hits        10673    10705   +32     
- Misses       4430     4443   +13     
  Partials      463      463           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hwbrzzl hwbrzzl marked this pull request as ready for review December 4, 2025 07:57
@hwbrzzl hwbrzzl requested a review from a team as a code owner December 4, 2025 07:57
Copilot AI review requested due to automatic review settings December 4, 2025 07:57
Copy link
Contributor

Copilot AI left a comment

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 adds support for the WithFilters function to the ApplicationBuilder, enabling users to register validation filters through the new bootstrap-based setup pattern (foundation.Setup() chain). This complements the existing WithRules functionality and addresses issue #821.

Key Changes:

  • Added WithFilters() method to ApplicationBuilder for registering validation filters
  • Enhanced filter make command to support both bootstrap and kernel-based registration
  • Created comprehensive utility functions and matchers for filter registration

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Show a summary per file
File Description
contracts/foundation/application_builder.go Added WithFilters method to ApplicationBuilder interface
foundation/application_builder.go Implemented WithFilters method and filter registration logic
foundation/application_builder_test.go Added comprehensive tests for WithFilters functionality
validation/console/filter_make_command.go Updated to support both bootstrap and kernel registration patterns
validation/console/filter_make_command_test.go Added extensive tests covering bootstrap and non-bootstrap scenarios
packages/modify/utils.go Added AddFilter utility function following existing patterns
packages/modify/utils_test.go Added comprehensive tests for AddFilter function
packages/modify/with_slice_actions.go Enhanced documentation for AddItem method
packages/modify/stubs.go Added filters stub template for bootstrap setup
packages/match/helper.go Added Filters matcher for Go node matching
errors/list.go Added PackageFiltersFileExists error message
mocks/foundation/ApplicationBuilder.go Generated mock for WithFilters method

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@hwbrzzl hwbrzzl merged commit f59638f into master Dec 4, 2025
20 checks passed
@hwbrzzl hwbrzzl deleted the bowen/#821 branch December 4, 2025 08:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SUB-786] Add WithFilters function

2 participants