Skip to content

Instantly share code, notes, and snippets.

@yaf
Created September 10, 2024 14:25
Show Gist options
  • Save yaf/0fa3df1815d69c4db6a1d9930d0117b9 to your computer and use it in GitHub Desktop.
Save yaf/0fa3df1815d69c4db6a1d9930d0117b9 to your computer and use it in GitHub Desktop.
for model in (find src/shared/domain/models/ -type f)
set modelFilename (string split / $model)[-1]
set importerFiles (rg -l $modelFilename src)
set onlyInShared true
set boundedContextList
for importerFile in $importerFiles
set boundedContext (string split / $importerFile)[2]
set -a boundedContextList $boundedContext
end
if test (count $boundedContextList) -eq 1
and test $boundedContextList[1] != 'shared'
echo $modelFilename " is used only in: " $boundedContextList
echo '---'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment