Skip to content

Commit 3993406

Browse files
authored
Add .vscode/ to the list of write-protected files/directories (#5347)
1 parent 89d28a5 commit 3993406

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/core/protect/RooProtectedController.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export class RooProtectedController {
1818
".roorules*",
1919
".clinerules*",
2020
".roo/**",
21+
".vscode/**",
2122
".rooprotected", // For future use
2223
]
2324

src/core/protect/__tests__/RooProtectedController.spec.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ describe("RooProtectedController", () => {
3838
expect(controller.isWriteProtected(".clinerules.md")).toBe(true)
3939
})
4040

41+
it("should protect files in .vscode directory", () => {
42+
expect(controller.isWriteProtected(".vscode/settings.json")).toBe(true)
43+
expect(controller.isWriteProtected(".vscode/launch.json")).toBe(true)
44+
expect(controller.isWriteProtected(".vscode/tasks.json")).toBe(true)
45+
})
46+
4147
it("should not protect other files starting with .roo", () => {
4248
expect(controller.isWriteProtected(".roosettings")).toBe(false)
4349
expect(controller.isWriteProtected(".rooconfig")).toBe(false)
@@ -134,6 +140,7 @@ describe("RooProtectedController", () => {
134140
".roorules*",
135141
".clinerules*",
136142
".roo/**",
143+
".vscode/**",
137144
".rooprotected",
138145
])
139146
})

0 commit comments

Comments
 (0)