Created
September 26, 2019 01:06
-
-
Save mhagrelius/c305aa0b793dee4520e8d5edf96fe5a6 to your computer and use it in GitHub Desktop.
Test for adherence to clean architecture guidelines
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
RESULT=$(grep -r -i --include \*.cs --include \*.cshtml --exclude Startup.cs --exclude /bin/\* --exclude /obj/\* --exclude /Configuration/\*.cs "Infrastructure.Namespace.Here" FolderNameHere) | |
if [ -z "$RESULT" ] | |
then | |
echo $RESULT | |
exit 1 | |
fi | |
echo "No issues found." | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
See Clean Architecture Writeup. This script helps enforce only references to Core interfaces/abstractions instead of concrete Infrastructure classes outside of configuration areas (e.g. when wiring up DI Container, etc)