Calculate the total number of lines of code on mac

The latest company needs to apply for a patent for the project whose front-end time has passed. I need to count the project code here, find the Xcode plug-in management tool Alcatraz at the first time, and find the plug-in ZLXCodeLine, which is a plug-in that quickly counts the code quantity of Xcode projects. However, it seems that Alcatraz installation is no longer supported, and the corresponding link cannot be found on GitHub, so there is the following method:

Step 1:

Open the terminal, use the cd command to locate the directory where the project is located, and then call the following naming to put each The number of lines and the total number of source code files are counted:
find . "(" -name "*.m" -or -name "*.mm" -or -name "*.cpp" -or -name "*.h" -or -name "*.rss" ")" -print | xargs wc -l

Where -name "*.m" means a file with the extension .m. At the same time, the commands to count java files and xml files are:
find . "(" -name "*.java"  ")" -print | xargs wc -l

as well as:
find . "(" -name "*.xml"  ")" -print | xargs wc -l

The final result looks like the image below:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326176484&siteId=291194637