How LOC is computed in SonarQube, NDepend and Visual Studio
Lines of Code (short LOC) are an often used metric to compare projects by their size. All you need to do is to count the lines of source code to figure out if project A is bigger than project B. However, that is only true when they use the same programming language. Only then can you do the same work in a line of code. If you compare Ruby with C or Assembler your LOC metric may differ by many orders of magnitude to get the same things done.