Add .vscode/ to the list of write-protected files/directories (#5347)

This commit is contained in:
Matt Rubens 2025-07-02 13:17:20 -04:00 committed by GitHub
parent 89d28a5e66
commit 3993406ebd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -18,6 +18,7 @@ export class RooProtectedController {
".roorules*",
".clinerules*",
".roo/**",
".vscode/**",
".rooprotected", // For future use
]

View file

@ -38,6 +38,12 @@ describe("RooProtectedController", () => {
expect(controller.isWriteProtected(".clinerules.md")).toBe(true)
})
it("should protect files in .vscode directory", () => {
expect(controller.isWriteProtected(".vscode/settings.json")).toBe(true)
expect(controller.isWriteProtected(".vscode/launch.json")).toBe(true)
expect(controller.isWriteProtected(".vscode/tasks.json")).toBe(true)
})
it("should not protect other files starting with .roo", () => {
expect(controller.isWriteProtected(".roosettings")).toBe(false)
expect(controller.isWriteProtected(".rooconfig")).toBe(false)
@ -134,6 +140,7 @@ describe("RooProtectedController", () => {
".roorules*",
".clinerules*",
".roo/**",
".vscode/**",
".rooprotected",
])
})