feat: added formatting for "dotnet foramt"

This commit is contained in:
D. Moonfire 2024-04-18 21:48:47 -05:00
parent e28714549d
commit 5f2895af1f
2 changed files with 12 additions and 1 deletions

View file

@ -44,7 +44,7 @@
conformDefaults = { scopes = [ ]; }; conformDefaults = { scopes = [ ]; };
contributorCovenantDefaults = { enable = false; }; contributorCovenantDefaults = { enable = false; };
developerCertificateOfOriginDefaults = { enable = false; }; developerCertificateOfOriginDefaults = { enable = false; };
dotnetDefaults = { enable = false; }; dotnetDefaults = { enable = false; format = false; };
prettierDefaults = { proseWrap = "preserve"; }; prettierDefaults = { proseWrap = "preserve"; };
rustDefaults = { enable = false; }; rustDefaults = { enable = false; };
licenseDefaults = { enable = false; filename = "LICENSE.md"; }; licenseDefaults = { enable = false; filename = "LICENSE.md"; };

View file

@ -32,6 +32,17 @@ let
includes = [ "*.cs" ]; includes = [ "*.cs" ];
}; };
} }
// pkgs.lib.attrsets.optionalAttrs dotnet.format {
dotnet-format-style = {
command = "dotnet format style --include";
includes = [ "*.cs" ];
};
dotnet-format-analyzers = {
command = "dotnet format analyzers --include";
includes = [ "*.cs" ];
};
}
// pkgs.lib.attrsets.optionalAttrs rust.enable { // pkgs.lib.attrsets.optionalAttrs rust.enable {
rust = { rust = {
command = "rustfmt"; command = "rustfmt";