Minor changes
Empty file ISO Add date back for just .kanbn Removed HardcodedFileSearchAndSort Sync with 01-23 JsonToTsv System.Text.Json White-List Ready to move to Move Helper Remove Whitelist Force Start At Check for .git directory before ls Optional Allow root for unc path nuget bump PreVerify EnforceCodeStyleInBuild dotnet_analyzer_diagnostic HelperGit searchDelegate Host File AlertIfNewDeviceIsConnected AOT SetFrontMatterAndH1 Match Error Unknown with better logging Undo 04-05 WriteAppendToHostConfFile MonA IsKanbanIndex Dotnet Format Pre-commit NPM CreateWindowsShortcut Working directory Split description Copy tests Ready to test Delete after a couple of days GitConfigCleanUp knb Files
This commit is contained in:
32
.vscode/pre-commit
vendored
Normal file
32
.vscode/pre-commit
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "*****eclint fix******"
|
||||
|
||||
before=$(git ls-files --others --modified --deleted --exclude-standard | wc -l)
|
||||
echo "before: $before"
|
||||
|
||||
dotnet format whitespace
|
||||
|
||||
err=$?
|
||||
|
||||
case $err in
|
||||
0) echo success ;;
|
||||
1) echo fail ;;
|
||||
2) echo "unexpected failure" ;;
|
||||
*) echo "I never thought this would happen" ;;
|
||||
esac
|
||||
|
||||
if [ $err -ne 0 ]; then
|
||||
exit $err
|
||||
fi
|
||||
|
||||
after=$(git ls-files --others --modified --deleted --exclude-standard | wc -l)
|
||||
echo "after: $after"
|
||||
|
||||
if [ $after -gt $before ]; then
|
||||
files=$(git ls-files --others --modified --deleted --exclude-standard)
|
||||
echo "Files not formatted correctly: $files"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exit $err
|
Reference in New Issue
Block a user