Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@AvdLee
Last active December 10, 2023 19:24
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AvdLee/52109fe9802ebffa70e624cdf6abef69 to your computer and use it in GitHub Desktop.
Save AvdLee/52109fe9802ebffa70e624cdf6abef69 to your computer and use it in GitHub Desktop.
Find your project's Swift file with the most lines of code
find . -type f -name "*.swift" -exec grep -H -c '[^[:space:]]' {} \; | \sort -nr -t":" -k2 | awk -F: '{printf("Your largest file %s contains: %s lines \n", $1, $2); exit;}'
@AvdLee
Copy link
Author

AvdLee commented Sep 6, 2019

Your largest file ./Vendor/Rabbit/RabbitTests/CoreData Migrations/Stores/Migration Validation Data/Version107ToVersion200LargeCollectionData.swift contains: 1825 lines

It's a test related file, though! But still a lot 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment