add dotnet-format as pre-commit hook

This commit is contained in:
Liza 2022-12-01 17:56:26 +01:00
parent e6c56e5bce
commit 3c6822aa64
5 changed files with 16 additions and 9 deletions

7
.githooks/pre-commit Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
#
# Use with:
#
# $> git config core.hooksPath .githooks
#
dotnet format --exclude vendor/

View File

@ -15,7 +15,7 @@ namespace Pal.Client.Net
}
public IDisposable BeginScope<TState>(TState state)
where TState: notnull
where TState : notnull
=> NullScope.Instance;
public bool IsEnabled(LogLevel logLevel) => logLevel != LogLevel.None;