Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check command stale todos with supplied files #415

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Oct 18, 2024

  1. Fix check command stale todos with supplied files

    Because the PackageTodo class didn't know what files had been
    supplied it would erroneously suspect files had been deleted
    if you only passed a single file on the command line.
    
    We do this in a pre-commit hook with `bundle exec packwerk check $(git diff --name-only)`
    and it was causing issues; the tool would assert there were stale
    todos when there are not.
    
    This changes the method signature of OffenseFormatter.show_stale_violations to
    accept a FilesForProcessing instance instead of Set[String] and
    plubms the FilesForProcessing through to PackageTodo#stale_violations? so
    that it can call #files_specified? on it. If there were files specified
    in the command invokation it skips the #deleted_files_for call.
    
    Happy to make any adjustments. This addresses Shopify#369
    jmcfarland-figma committed Oct 18, 2024
    Configuration menu
    Copy the full SHA
    98ccee7 View commit details
    Browse the repository at this point in the history