[Bug Report] Getting "There were stale violations found, please run `packwerk update-todo`" even there is no stale violations
Open
Nobody has claimed this yet.
bug
- Dominant language
- Ruby
- Stars
- 1.9k
- Forks
- 121
- Avg merge
- 2m
- Merged PRs (30d)
- 1
Description
Description
I'm getting "There were stale violations found, please run packwerk update-todo" when I run check command againts some files.
For this you have to have one violation in several files.
For example:
# This file contains a list of dependencies that are not part of the long term plan for the
# 'packs/one' package.
# We should generally work to reduce this list over time.
#
# You can regenerate this file using the following command:
#
# bin/packwerk update-todo
---
".":
"::ApplicationController":
violations:
- dependency
files:
- packs/one/bar.rb
- packs/one/baz.rb
To Reproduce
- Create a dependency violation in the first file.
- Create the same dependency violation in another file within the same package.
- Run
packwerk update-todoin order to generate package_todo.yml file. - Run
packwerk check path/to/the/first_file.rb.
Actual Behaviour
- Command returns
1status. - Command output contains info about stale violations.
📦 Finished in X.XX seconds
No offenses detected
There were stale violations found, please run `packwerk update-todo`
Expected Behaviour
- Command returns
0status - Command output has no info about stale violations
Version Information
- Packwerk: 3.1.0
- Ruby: 3.2.1
Additional Context
3.0.1 has no this problem
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue using packwerk update-todo and packwerk check path/to/the/first_file.rb with the same violation in multiple files. Compare the behavior with Packwerk 3.0.1 and 3.1.0, then verify that the targeted check returns status 0 without stale-violation output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 42/100