mirror of
https://github.com/nsnail/dot.git
synced 2025-06-19 13:58:16 +08:00
<chore>
This commit is contained in:
16
CodeCleanupOnSave.csx
Normal file
16
CodeCleanupOnSave.csx
Normal file
@ -0,0 +1,16 @@
|
||||
var path = Directory.GetFiles(@".idea", "workspace.xml", SearchOption.AllDirectories).First();
|
||||
const string findStr = """
|
||||
"keyToString": {
|
||||
""";
|
||||
const string replaceStr = """
|
||||
"keyToString": {
|
||||
"rider.code.cleanup.on.save": "true",
|
||||
""";
|
||||
var content = File.ReadAllText(path);
|
||||
if(content.Contains("rider.code.cleanup.on.save")){
|
||||
Console.WriteLine("alreay added");
|
||||
return;
|
||||
}
|
||||
content = content.Replace(findStr, replaceStr);
|
||||
Console.WriteLine(content);
|
||||
File.WriteAllText(path, content);
|
Reference in New Issue
Block a user