Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

[Bug Report] Getting "There were stale violations found, please run `packwerk update-todo`" even there is no stale violations

未关闭
#369 7 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

@jmcfarland-figma 已经在做这个了。

开始于 2024年10月18日。

  • #415 来自 @jmcfarland-figma —— 未关闭

评估

难度
3/5
预计耗时
1-2 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
ruby
领域
cli, tooling

调研方向

使用 packwerk update-todo 和 packwerk check path/to/the/first_file.rb,在多个文件中存在相同违规的情况下复现该问题。将 Packwerk 3.0.1 和 3.1.0 的行为进行比较,然后验证目标检查返回状态 0,且没有 stale-violation 输出。

由索引模型根据 Issue 内容生成。

描述

bug

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

  1. Create a dependency violation in the first file.
  2. Create the same dependency violation in another file within the same package.
  3. Run packwerk update-todo in order to generate package_todo.yml file.
  4. Run packwerk check path/to/the/first_file.rb.

Actual Behaviour

  • Command returns 1 status.
  • 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 0 status
  • 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

主要语言
Ruby
星标
1.9k
派生
123
PR 合并指标
30 天内没有已合并 PR

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Shopify/packwerk 的其他 Issue

查看 Shopify/packwerk 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。