Skip to content

[GH-7092] Add Rubyzen tests, documentation, GitHub Action, skills, and copilot instructions#24

Merged
Stelios Frantzeskakis (steliosfran) merged 12 commits into
mainfrom
7092-add-rubyzen-tests-documentation-github-action-skills-and-copilot-instructions
May 5, 2026
Merged

[GH-7092] Add Rubyzen tests, documentation, GitHub Action, skills, and copilot instructions#24
Stelios Frantzeskakis (steliosfran) merged 12 commits into
mainfrom
7092-add-rubyzen-tests-documentation-github-action-skills-and-copilot-instructions

Conversation

@steliosfran
Copy link
Copy Markdown
Collaborator

@steliosfran Stelios Frantzeskakis (steliosfran) commented May 1, 2026

  • Add tests for all public APIs of Rubyzen and internal parsing
  • Add documentation using YARD
  • Add be_false matcher with baseline
  • Remove legacy GitHub Action that was running the lint rules in the sample project
  • Add GitHub Action running tests on every PR open
  • Add expand-rubyzen SKILL.md
  • Add add-rubyzen-tests SKILL.md
  • Add run-tests SKILL.md
  • Add write-lint-rule SKILL.md
  • Add run-lint-rules SKILL.md
  • Add copilot-instructions.md for the Copilot code review

Copy link
Copy Markdown

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

Adds a full unit-test suite and supporting documentation/CI for Rubyzen’s public API, including matcher enhancements and deprecation guidance for legacy matcher usage.

Changes:

  • Add RSpec unit tests for Rubyzen declarations, providers, collections, cache, configuration, and matchers.
  • Expand YARD-style documentation across Rubyzen core types and add yard as a dependency.
  • Replace legacy GitHub Action workflow with a dedicated unit-test workflow for PRs.

Reviewed changes

Copilot reviewed 106 out of 107 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
spec/support/parse_helper.rb Adds a parse_ruby helper for unit tests and includes it in RSpec config.
spec/spec_helper.rb Loads Rubyzen and test support, sets RSpec formatter.
spec/rspec/rspec_config_spec.rb Adds subprocess specs for the RSpec expect override behavior.
spec/project_spec.rb Adds coverage for Rubyzen::Project file/class/module enumeration and path arrays.
spec/parsers/ast_parser_spec.rb Adds coverage for singleton parser behavior and parse success/failure.
spec/matchers/be_true_matcher_spec.rb Adds unit tests for be_true matcher (baseline/allowlist/custom message).
spec/matchers/be_false_matcher_spec.rb Adds unit tests for be_false matcher (baseline/allowlist/custom message).
spec/matchers/be_empty_with_exceptions_matcher_spec.rb Adds unit tests for deprecated matcher behavior + deprecation output.
spec/matchers/be_empty_matcher_spec.rb Adds unit tests for be_empty including baseline/allowlist cases.
spec/fixtures/models/sample_model.rb Adds fixture model file for Project integration tests.
spec/fixtures/controllers/sample_controller.rb Adds fixture controller file for Project integration tests.
spec/declarations/rescue_declaration_spec.rb Adds tests for RescueDeclaration APIs and providers.
spec/declarations/require_declaration_spec.rb Adds tests for RequireDeclaration APIs and providers.
spec/declarations/raise_declaration_spec.rb Adds tests for RaiseDeclaration APIs and providers.
spec/declarations/parameter_declaration_spec.rb Adds tests for ParameterDeclaration APIs and providers.
spec/declarations/module_declaration_spec.rb Adds tests for ModuleDeclaration APIs and nested structure behavior.
spec/declarations/method_declaration_spec.rb Adds tests for MethodDeclaration APIs (parameters, calls, blocks, visibility, etc.).
spec/declarations/macro_declaration_spec.rb Adds tests for MacroDeclaration APIs (symbols/strings/keyword args/receiver).
spec/declarations/if_statement_declaration_spec.rb Adds tests for IfStatementDeclaration APIs and providers.
spec/declarations/file_declaration_spec.rb Adds tests for FileDeclaration APIs and provider-driven accessors.
spec/declarations/constant_declaration_spec.rb Adds tests for ConstantDeclaration APIs and scoping helpers.
spec/declarations/class_declaration_spec.rb Adds tests for ClassDeclaration APIs and provider-driven accessors.
spec/declarations/call_site_declaration_spec.rb Adds tests for CallSiteDeclaration APIs (receiver/args/source/line).
spec/declarations/block_declaration_spec.rb Adds tests for BlockDeclaration APIs and nested providers (rescues/raises/calls).
spec/declarations/attribute_declaration_spec.rb Adds tests for AttributeDeclaration APIs including visibility.
spec/configuration_spec.rb Adds tests for env-driven configuration parsing and error cases.
spec/collections/rescues_collection_spec.rb Adds tests for RescuesCollection filtering.
spec/collections/requires_collection_spec.rb Adds tests for RequiresCollection filtering and name filters.
spec/collections/raises_collection_spec.rb Adds tests for RaisesCollection filtering.
spec/collections/parameters_collection_spec.rb Adds tests for ParametersCollection name filtering.
spec/collections/modules_collection_spec.rb Adds tests for ModulesCollection aggregation and filtering.
spec/collections/methods_collection_spec.rb Adds tests for MethodsCollection aggregation (params/calls/raises/rescues).
spec/collections/macros_collection_spec.rb Adds tests for MacrosCollection name filtering.
spec/collections/file_collection_spec.rb Adds tests for FileCollection path filtering + aggregated accessors.
spec/collections/constants_collection_spec.rb Adds tests for ConstantsCollection name filtering.
spec/collections/classes_collection_spec.rb Adds tests for ClassesCollection aggregation and inheritance/macro filters.
spec/collections/call_site_collection_spec.rb Adds tests for CallSiteCollection receiver/name/arg filters.
spec/collections/blocks_collection_spec.rb Adds tests for BlocksCollection method-name filtering and call aggregation.
spec/collections/base_collection_spec.rb Adds tests for BaseCollection#filter + select/reject being undefined.
spec/collections/attributes_collection_spec.rb Adds tests for AttributesCollection reader/writer/accessor filters.
spec/cache/parse_cache_spec.rb Adds tests for cache hit/miss and invalidation on content change.
sample_project/spec/matchers/be_true_matcher_spec.rb Removes sample-project matcher spec in favor of Rubyzen unit tests.
sample_project/spec/matchers/be_empty_matcher_spec.rb Removes sample-project matcher spec in favor of Rubyzen unit tests.
lib/rubyzen/rspec/rspec_config.rb Adds documentation for RSpec expect override intent/behavior.
lib/rubyzen/providers/visibility_provider.rb Adds YARD docs for visibility helpers.
lib/rubyzen/providers/source_code_provider.rb Adds YARD docs for source_code.
lib/rubyzen/providers/rescues_provider.rb Adds YARD docs for rescues provider.
lib/rubyzen/providers/requires_provider.rb Adds YARD docs for requires provider.
lib/rubyzen/providers/raises_provider.rb Adds YARD docs for raises provider.
lib/rubyzen/providers/macros_provider.rb Adds YARD docs for macros provider.
lib/rubyzen/providers/lines_of_code_provider.rb Adds YARD docs for LOC provider.
lib/rubyzen/providers/line_number_provider.rb Adds YARD docs for line-number provider.
lib/rubyzen/providers/if_statements_provider.rb Adds YARD docs for if-statements provider.
lib/rubyzen/providers/file_path_provider.rb Adds YARD docs for file-path provider.
lib/rubyzen/providers/constants_provider.rb Adds YARD docs for constants provider.
lib/rubyzen/providers/collection_filter_provider.rb Adds YARD docs for collection name filtering API.
lib/rubyzen/providers/class_name_provider.rb Adds YARD docs for class-name provider.
lib/rubyzen/providers/call_site_provider.rb Adds YARD docs for call-site provider.
lib/rubyzen/providers/blocks_provider.rb Adds YARD docs for blocks provider.
lib/rubyzen/providers/attributes_provider.rb Adds YARD docs for attributes provider.
lib/rubyzen/project.rb Adds top-level docs and YARD docs for main API methods.
lib/rubyzen/parsers/a_s_t_parser.rb Adds YARD docs for parser singleton and parse_file.
lib/rubyzen/matchers/matcher_helpers.rb Adds extensive YARD docs for helper behavior and failure formatting.
lib/rubyzen/matchers/be_true_matcher.rb Updates negated failure message and adds YARD docs/examples.
lib/rubyzen/matchers/be_false_matcher.rb Extends matcher to support allowlist/baseline and improves messaging/docs.
lib/rubyzen/matchers/be_empty_with_exceptions_matcher.rb Deprecates matcher and delegates to be_empty with warning.
lib/rubyzen/matchers/be_empty_matcher.rb Adds YARD docs/examples and supports allowlist/baseline.
lib/rubyzen/declarations/rescue_declaration.rb Adds YARD docs and clarifies attributes.
lib/rubyzen/declarations/require_declaration.rb Adds YARD docs and clarifies attributes.
lib/rubyzen/declarations/raise_declaration.rb Adds YARD docs and clarifies attributes.
lib/rubyzen/declarations/parameter_declaration.rb Adds YARD docs and clarifies attributes.
lib/rubyzen/declarations/module_declaration.rb Adds YARD docs for module declaration APIs.
lib/rubyzen/declarations/method_declaration.rb Adds YARD docs for method declaration APIs.
lib/rubyzen/declarations/macro_declaration.rb Adds YARD docs for macro declaration APIs.
lib/rubyzen/declarations/if_statement_declaration.rb Adds YARD docs for if-statement declaration APIs.
lib/rubyzen/declarations/file_declaration.rb Adds YARD docs for file declaration APIs.
lib/rubyzen/declarations/constant_declaration.rb Adds YARD docs for constant declaration APIs and scoping helpers.
lib/rubyzen/declarations/class_declaration.rb Adds YARD docs for class declaration APIs.
lib/rubyzen/declarations/call_site_declaration.rb Adds YARD docs for call-site declaration APIs.
lib/rubyzen/declarations/block_declaration.rb Adds YARD docs for block declaration APIs.
lib/rubyzen/declarations/attribute_declaration.rb Adds YARD docs for attribute declaration APIs.
lib/rubyzen/collections/rescues_collection.rb Adds YARD docs for rescues collection filtering.
lib/rubyzen/collections/requires_collection.rb Adds YARD docs for requires collection filtering.
lib/rubyzen/collections/raises_collection.rb Adds YARD docs for raises collection filtering.
lib/rubyzen/collections/parameters_collection.rb Adds YARD docs for parameters collection.
lib/rubyzen/collections/modules_collection.rb Adds YARD docs for modules collection aggregation.
lib/rubyzen/collections/methods_collection.rb Adds YARD docs for methods collection aggregation.
lib/rubyzen/collections/macros_collection.rb Adds YARD docs for macros collection.
lib/rubyzen/collections/file_collection.rb Adds YARD docs for file collection navigation/aggregation.
lib/rubyzen/collections/declaration_collection.rb Adds YARD docs for generic declaration collection.
lib/rubyzen/collections/constants_collection.rb Adds YARD docs for constants collection.
lib/rubyzen/collections/classes_collection.rb Adds YARD docs for classes collection aggregation and filters.
lib/rubyzen/collections/call_site_collection.rb Adds YARD docs for call-site collection filters.
lib/rubyzen/collections/blocks_collection.rb Adds YARD docs for blocks collection filters/aggregation.
lib/rubyzen/collections/base_collection.rb Adds YARD docs for filter and Array behavior constraints.
lib/rubyzen/collections/attributes_collection.rb Adds YARD docs for attributes collection filters.
lib/rubyzen/cache/parse_cache.rb Adds YARD docs for parse cache behavior.
lib/rubyzen.rb Adds top-level library documentation and improves configuration docs.
Gemfile.lock Adds yard dependency resolution to the lockfile.
Gemfile Adds yard gem dependency.
CLAUDE.md Replaces prior content with expanded Rubyzen architecture and testing guide.
.github/workflows/tests.yml Adds PR CI workflow to run Rubyzen unit tests.
.github/workflows/rubyzen-analysis.yml Removes legacy sample-project Rubyzen analysis workflow.
.claude/skills/write-lint-rule/SKILL.md Adds Claude skill doc for authoring lint rules with Rubyzen.
.claude/skills/expand-rubyzen/SKILL.md Adds Claude skill doc for adding new Rubyzen concepts end-to-end.
.claude/skills/add-rubyzen-tests/SKILL.md Adds Claude skill doc for writing Rubyzen unit tests.

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

Comment thread lib/rubyzen/matchers/be_empty_with_exceptions_matcher.rb Outdated
Comment thread spec/declarations/constant_declaration_spec.rb
Comment thread spec/rspec/rspec_config_spec.rb
Copilot AI review requested due to automatic review settings May 2, 2026 00:37
Copy link
Copy Markdown

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

Copilot reviewed 106 out of 107 changed files in this pull request and generated 3 comments.


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

Comment thread lib/rubyzen/declarations/module_declaration.rb
Comment thread lib/rubyzen/declarations/call_site_declaration.rb Outdated
Comment thread lib/rubyzen/rspec/rspec_config.rb
Copilot AI review requested due to automatic review settings May 2, 2026 01:33
Copy link
Copy Markdown

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

Copilot reviewed 109 out of 110 changed files in this pull request and generated 4 comments.


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

Comment thread lib/rubyzen/rspec/rspec_config.rb
Comment thread lib/rubyzen/declarations/module_declaration.rb
Comment thread lib/rubyzen/providers/collection_filter_provider.rb
Comment thread lib/rubyzen/declarations/call_site_declaration.rb
Copilot AI review requested due to automatic review settings May 2, 2026 01:53
Copy link
Copy Markdown

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

Copilot reviewed 109 out of 110 changed files in this pull request and generated 4 comments.


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

Comment thread lib/rubyzen/matchers/be_false_matcher.rb
Comment thread spec/rspec/rspec_config_spec.rb
Comment thread spec/collections/file_collection_spec.rb
Comment thread spec/collections/file_collection_spec.rb
Comment thread spec/declarations/constant_declaration_spec.rb
Comment thread spec/declarations/constant_declaration_spec.rb
Comment thread CLAUDE.md Outdated
Comment thread README.md Outdated
Copilot AI review requested due to automatic review settings May 3, 2026 23:00
Comment thread lib/rubyzen/declarations/constant_declaration.rb
Copy link
Copy Markdown

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

Copilot reviewed 110 out of 111 changed files in this pull request and generated 2 comments.


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

Comment thread lib/rubyzen/declarations/constant_declaration.rb
Comment thread lib/rubyzen/matchers/be_empty_with_exceptions_matcher.rb
Comment thread .devcontainer/README.md Outdated
Comment thread .devcontainer/README.md Outdated
Copilot AI review requested due to automatic review settings May 5, 2026 22:28
Copy link
Copy Markdown

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

Copilot reviewed 112 out of 113 changed files in this pull request and generated 2 comments.


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

Comment thread lib/rubyzen/declarations/constant_declaration.rb
Comment thread lib/rubyzen/providers/collection_filter_provider.rb
@steliosfran Stelios Frantzeskakis (steliosfran) merged commit 18b57cf into main May 5, 2026
1 check passed
@steliosfran Stelios Frantzeskakis (steliosfran) deleted the 7092-add-rubyzen-tests-documentation-github-action-skills-and-copilot-instructions branch May 5, 2026 23:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants