fix: doctor check skips interactions.jsonl and molecules.jsonl (GH#709) (#739)
The fix for GH#709 updated FindJSONLInDir to skip interactions.jsonl, but the doctor check in CheckLegacyJSONLFilename was not updated. This caused `bd doctor` to warn about multiple JSONL files when both issues.jsonl and interactions.jsonl exist (which is normal after `bd init`). Also skip molecules.jsonl which is another system file that shouldn't be counted as a duplicate issue database.
This commit is contained in:
committed by
GitHub
parent
acb4aeee55
commit
939ade731f
@@ -154,6 +154,8 @@ func CheckLegacyJSONLFilename(repoPath string) DoctorCheck {
|
|||||||
strings.Contains(lowerName, "~") ||
|
strings.Contains(lowerName, "~") ||
|
||||||
strings.HasPrefix(lowerName, "backup_") ||
|
strings.HasPrefix(lowerName, "backup_") ||
|
||||||
name == "deletions.jsonl" ||
|
name == "deletions.jsonl" ||
|
||||||
|
name == "interactions.jsonl" ||
|
||||||
|
name == "molecules.jsonl" ||
|
||||||
// Git merge conflict artifacts (e.g., issues.base.jsonl, issues.left.jsonl)
|
// Git merge conflict artifacts (e.g., issues.base.jsonl, issues.left.jsonl)
|
||||||
strings.Contains(lowerName, ".base.jsonl") ||
|
strings.Contains(lowerName, ".base.jsonl") ||
|
||||||
strings.Contains(lowerName, ".left.jsonl") ||
|
strings.Contains(lowerName, ".left.jsonl") ||
|
||||||
|
|||||||
@@ -278,6 +278,24 @@ func TestCheckLegacyJSONLFilename(t *testing.T) {
|
|||||||
expectedStatus: "ok",
|
expectedStatus: "ok",
|
||||||
expectWarning: false,
|
expectWarning: false,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "interactions.jsonl ignored as system file (GH#709)",
|
||||||
|
files: []string{"issues.jsonl", "interactions.jsonl"},
|
||||||
|
expectedStatus: "ok",
|
||||||
|
expectWarning: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "molecules.jsonl ignored as system file",
|
||||||
|
files: []string{"issues.jsonl", "molecules.jsonl"},
|
||||||
|
expectedStatus: "ok",
|
||||||
|
expectWarning: false,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "all system files ignored together",
|
||||||
|
files: []string{"issues.jsonl", "deletions.jsonl", "interactions.jsonl", "molecules.jsonl"},
|
||||||
|
expectedStatus: "ok",
|
||||||
|
expectWarning: false,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range tests {
|
for _, tt := range tests {
|
||||||
|
|||||||
Reference in New Issue
Block a user