Toad World® Forums

Lines of Code Metric Tool


Hello All,
This is my first contribution to the forum so if my post deviates from the standards set by this forum I apologize. Corrective responses are welcome. First, I would like to introduce myself. I am a lead database developer on a team of 5 developers working in the government DOD contracting space. I’ve been working with Oracle for about 15 years or so. Today we attended an on-site training session with Russ Tuttle, a Toad for Oracle guru visiting us from Quest. The two hour session was extremely valuable to my despite having used Toad for Oracle for about 13 years. To the point, I asked if Toad has a configurable line of code counting feature. Toad already has configurable some automated metrics gathering features such as refactoring and code analysis. I personally think it would be an easy feature to implement and quite useful. I look forward to feedback on my suggestion. Thank you.


I think that a feature to count lines of code would be a great addition to Toad!


If you look in the lower left corner when you select code it shows start and end positions as well as the number of characters selected (something I requested years ago). Seem like it “could” be possible to include lines selected there, if it could be done unobtrusively and not provide confusing results – is it lines, or characters? Could it be both? X characters in y lines?


Hi Chris,
yes I see the loc number in the lower left. What I’m thinking about is a feature that allows us to determine what lines to count and what lines not to count. As well, a diff functionality that shows lines modified, deleted, added between revisions of code. It’s already integrated with GIT so that should be doable.


Hi Timothy,

Thanks for your feedback and idea! Toad already does have these features available in certain areas of Toad.

For the main topic you mentioned, if you’re talking in reference to PL/SQL objects (procedures, functions, packages, etc), Toad already reports on Lines of Code and Executable Lines within Code Analysis. You can find it listed underneath “Properties -> Module Analysis” in the Code Analysis window and in some of the exported reports.

As for lines modified / removed / added between revisions in Git, you can also view that fairly easily using Team Coding. In the Team Coding manager, right-click on the object in question and select “Show Properties”. Then click the tool button to show revisions. Finally, select the two revisions in question, right-click on them, and select “Compare Contents”. A compare window will open showing lines deleted, modified, added between those revisions.

Are you looking for these to appear somewhere else in Toad, or in a different way?




Thanks John! I will explore those features.