This commit is contained in:
nsnail 2022-12-07 16:23:38 +08:00
parent 1bb3a4f8bf
commit d0ffeb34a9
5 changed files with 37 additions and 14 deletions

11
code-cleanup-on-save.csx Normal file
View File

@ -0,0 +1,11 @@
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);
content = content.Replace(findStr, replaceStr);
File.WriteAllText(path, content);

View File

@ -22,6 +22,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "meta", "meta", "{AD79881E-7
git-clean.ps1 = git-clean.ps1 git-clean.ps1 = git-clean.ps1
code-format.cmd = code-format.cmd code-format.cmd = code-format.cmd
GenerateResx.targets = GenerateResx.targets GenerateResx.targets = GenerateResx.targets
code-cleanup-on-save.csx = code-cleanup-on-save.csx
EndProjectSection EndProjectSection
EndProject EndProject
Global Global

View File

@ -1,12 +1,12 @@
{ {
"version": 1, "version": 1,
"isRoot": true, "isRoot": true,
"tools": { "tools": {
"dotnet-t4": { "dotnet-t4": {
"version": "2.3.1", "version": "2.3.1",
"commands": [ "commands": [
"t4" "t4"
] ]
}
} }
}
} }

11
src/CsxEditor.cs Normal file
View File

@ -0,0 +1,11 @@
namespace Dot;
// ReSharper disable once UnusedType.Global
public class CsxEditor
{
// ReSharper disable once UnusedMember.Local
#pragma warning disable CA1822
private void Run()
#pragma warning restore CA1822
{ }
}

View File

@ -24,10 +24,10 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" /> <PackageReference Include="CommandLineParser" Version="2.9.1"/>
<PackageReference Include="NSExt" Version="1.0.6" /> <PackageReference Include="NSExt" Version="1.0.6"/>
<PackageReference Include="ShellProgressBar" Version="5.2.0" /> <PackageReference Include="ShellProgressBar" Version="5.2.0"/>
<PackageReference Include="TextCopy" Version="6.2.0" /> <PackageReference Include="TextCopy" Version="6.2.0"/>
</ItemGroup> </ItemGroup>
@ -38,6 +38,6 @@
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
<Import Project="../GenerateResx.targets" /> <Import Project="../GenerateResx.targets"/>
</Project> </Project>