2
0
Эх сурвалжийг харах

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

Matt Rubens 6 сар өмнө
parent
commit
3993406ebd

+ 1 - 0
src/core/protect/RooProtectedController.ts

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

+ 7 - 0
src/core/protect/__tests__/RooProtectedController.spec.ts

@@ -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",
 			])
 		})