Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 10, 2025

YARD was emitting warnings about incorrectly formatted @see tags and unresolved link references. This cleans up the documentation to eliminate all warnings.

Changes

  • Removed curly braces from @see tags in 8 locations across lib/eaco/controller.rb, features/support/env.rb, lib/eaco/cucumber/world.rb, lib/eaco/rake/default_task.rb, and lib/eaco/cucumber/active_record.rb

  • Fully qualified ACL#find_by_role reference in lib/eaco/dsl/acl.rb to Eaco::ACL#find_by_role for proper link resolution

  • Updated CHANGELOG.md with Unreleased section documenting the fixes

Example

# Before (causes YARD warning)
# @see {Eaco::Resource}

# After
# @see Eaco::Resource

Running yard now completes with zero warnings while maintaining 100% documentation coverage.

Original prompt

The repository ifad/eaco currently produces YARD warnings when running yard:

  • [error]: Error loading plugin 'yard-cucumber'
  • [warn]: @see tag (#N) should not be wrapped in {} (causes rendering issues) in multiple files
  • [warn]: Cannot resolve link to ACL#find_by_role from text: ...{ACL#find_by_role}... in lib/eaco/dsl/acl.rb

We want to clean up these documentation warnings so that yard runs without emitting them.

Please make the following changes:

  1. Fix @see tags wrapped in {}

    In these files (line numbers approximate and based on current HEAD; please search within the file to confirm):

    • lib/eaco/controller.rb (around lines 77 and 90)
    • features/support/env.rb (around lines 18 and 26)
    • lib/eaco/cucumber/world.rb (around line 152)
    • lib/eaco/rake/default_task.rb (around line 194)
    • lib/eaco/cucumber/active_record.rb (around lines 73 and 152)

    There are @see tags written with curly-brace-style links, for example:

    # @see {World}
    # @see {ActiveRecord.define_schema!}
    # @see {SomeClass#some_method}

    YARD expects @see to take a reference without {}. Update these so they use standard YARD reference syntax:

    # @see World
    # @see ActiveRecord.define_schema!
    # @see SomeClass#some_method

    In general, remove the {} around the reference in @see tags, but keep them for inline links in normal comment text if any.

  2. Fix unresolved {ACL#find_by_role} links in lib/eaco/dsl/acl.rb

    YARD emits warnings in lib/eaco/dsl/acl.rb:

    • Cannot resolve link to ACL#find_by_role from text: ...{ACL#find_by_role}...

    This is because the ACL class is defined as Eaco::ACL, so the unqualified {ACL#find_by_role} may not resolve from the Eaco::DSL namespace.

    In lib/eaco/dsl/acl.rb, update the links to use the fully-qualified constant name:

    # BAD
    # for calling {ACL#find_by_role}.
    
    # GOOD
    # for calling {Eaco::ACL#find_by_role}.

    Apply this change to all occurrences of {ACL#find_by_role} in that file.

  3. (Optional but nice) Document the change

    If the project has a CHANGELOG or similar, add a brief note that YARD documentation warnings were cleaned up, referencing the specific changes to @see tags and ACL#find_by_role links, if that fits the project’s conventions.

  4. Verification

    • Run bundle exec yard (or yard if that’s how it’s invoked in this repo) and ensure that:
      • The warnings about @see tags being wrapped in {} are gone.
      • The warnings about unresolved ACL#find_by_role links are gone.
    • Do not change any runtime behavior—only documentation comments.

Create a pull request with these changes against the default branch of ifad/eaco. Include in the PR description a brief explanation of why the YARD annotations were updated and how it resolves the warnings observed when running yard.

This pull request was created as a result of the following prompt from Copilot chat.

The repository ifad/eaco currently produces YARD warnings when running yard:

  • [error]: Error loading plugin 'yard-cucumber'
  • [warn]: @see tag (#N) should not be wrapped in {} (causes rendering issues) in multiple files
  • [warn]: Cannot resolve link to ACL#find_by_role from text: ...{ACL#find_by_role}... in lib/eaco/dsl/acl.rb

We want to clean up these documentation warnings so that yard runs without emitting them.

Please make the following changes:

  1. Fix @see tags wrapped in {}

    In these files (line numbers approximate and based on current HEAD; please search within the file to confirm):

    • lib/eaco/controller.rb (around lines 77 and 90)
    • features/support/env.rb (around lines 18 and 26)
    • lib/eaco/cucumber/world.rb (around line 152)
    • lib/eaco/rake/default_task.rb (around line 194)
    • lib/eaco/cucumber/active_record.rb (around lines 73 and 152)

    There are @see tags written with curly-brace-style links, for example:

    # @see {World}
    # @see {ActiveRecord.define_schema!}
    # @see {SomeClass#some_method}

    YARD expects @see to take a reference without {}. Update these so they use standard YARD reference syntax:

    # @see World
    # @see ActiveRecord.define_schema!
    # @see SomeClass#some_method

    In general, remove the {} around the reference in @see tags, but keep them for inline links in normal comment text if any.

  2. Fix unresolved {ACL#find_by_role} links in lib/eaco/dsl/acl.rb

    YARD emits warnings in lib/eaco/dsl/acl.rb:

    • Cannot resolve link to ACL#find_by_role from text: ...{ACL#find_by_role}...

    This is because the ACL class is defined as Eaco::ACL, so the unqualified {ACL#find_by_role} may not resolve from the Eaco::DSL namespace.

    In lib/eaco/dsl/acl.rb, update the links to use the fully-qualified constant name:

    # BAD
    # for calling {ACL#find_by_role}.
    
    # GOOD
    # for calling {Eaco::ACL#find_by_role}.

    Apply this change to all occurrences of {ACL#find_by_role} in that file.

  3. (Optional but nice) Document the change

    If the project has a CHANGELOG or similar, add a brief note that YARD documentation warnings were cleaned up, referencing the specific changes to @see tags and ACL#find_by_role links, if that fits the project’s conventions.

  4. Verification

    • Run bundle exec yard (or yard if that’s how it’s invoked in this repo) and ensure that:
      • The warnings about @see tags being wrapped in {} are gone.
      • The warnings about unresolved ACL#find_by_role links are gone.
    • Do not change any runtime behavior—only documentation comments.

Create a pull request with these changes against the default branch of ifad/eaco. Include in the PR description a brief explanation of why the YARD annotations were updated and how it resolves the warnings observed when running yard.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Fix YARD warnings in documentation Fix YARD documentation warnings Dec 10, 2025
Copilot AI requested a review from tagliala December 10, 2025 10:53
@tagliala tagliala force-pushed the copilot/fix-yard-warnings branch 4 times, most recently from 0351ab8 to 4572eb9 Compare December 10, 2025 13:13
@tagliala tagliala marked this pull request as ready for review December 10, 2025 13:14
Additionally:
- Use https where possible
- Remove 404 links (`awesome_bot`)
- Fix typos (`codespell`)
Copy link

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 fixes YARD documentation warnings by correcting documentation formatting and resolving unresolved link references. The changes are documentation-only and don't affect runtime behavior, ensuring that running yard completes without warnings while maintaining 100% documentation coverage.

Key changes:

  • Removed curly braces from @see tags in 8 locations to comply with YARD syntax requirements
  • Fully qualified ACL#find_by_role references to Eaco::ACL#find_by_role for proper link resolution
  • Fixed spelling errors in comments and documentation throughout the codebase
  • Updated documentation URLs from http to https

Reviewed changes

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

Show a summary per file
File Description
lib/eaco/controller.rb Fixed 3 @see tags to remove curly braces, updated ASCII art URL to https
features/support/env.rb Fixed 2 @see tags to remove curly braces
lib/eaco/cucumber/world.rb Fixed @see tag, updated ASCII art URL to https
lib/eaco/rake/default_task.rb Fixed @see tag to remove curly braces
lib/eaco/cucumber/active_record.rb Fixed 2 @see tags, corrected spelling errors ("with", "environment")
lib/eaco/dsl/acl.rb Qualified ACL reference, fixed "persistence" spelling
lib/eaco/resource.rb Fixed "persistence" spelling in comment
lib/eaco/adapters/**/*.rb Fixed spelling errors ("persistence", "disappeared", "existence", "mimic")
lib/eaco/adapters.rb Fixed "persistence" spelling in module documentation
lib/eaco.rb Fixed "originally" spelling
spec/spec_helper.rb Updated RSpec documentation URL to https, removed outdated blog post references
spec/eaco_spec.rb Fixed "nonexistent" spelling in test case
CHANGELOG.md Added Unreleased section documenting the fixes, updated URLs to https

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

@tagliala tagliala merged commit 315004e into master Dec 10, 2025
42 checks passed
@tagliala tagliala deleted the copilot/fix-yard-warnings branch December 10, 2025 13:25
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.

2 participants