Ok, so I have taken a break from working on my OS (http://forum.osdev.org/viewtopic.php?f= ... OS#p135177), and I started working on one of my old projects. It is called Iterate, and it aims to be robust code metric tool. It started when I wanted a simple program to calculate the lines of code in one of my projects, not counting whitespace or comments. As I couldn't find simple enough one, I hacked one up in java (link below).
So I have started rewriting it in C++, and while it will still have the same capabilities as the original java version, it will have many more additional features. The biggest difference is that the new version will have a filetype, .itp, which will store all the information about a project that someone would want metrics on often. It not only stores information on all the files in the project, but meta information as well, so it can keep track of metrics generated for the project over time. This will allow iterate to output graphs and other things. Another advantage of the filetype is that you don't have to type in all the files you want to analyze , just the .itp file.
Here is my little hack:
http://www.eostorm.com/downloads/iterate/Iterate.jar
Usage:
java -jar Iterate.jar file_1 file_2 ... file_n
It automatically detects what kind of comments the files have and if it can't figure it out, defaults to c/c++ style comments.
supported comments:
c/c++ (.h/.c/.cpp/.hpp)
java (.java)
nasm (.asm)
pascal (.pas)
Iterate
Re: Iterate
I get a "Failed to load Main-Class manifest attribute from Iterate.jar" error on Ubuntu 8.04.1, JAVA v1.5.0, GIJ v4.2.3-2.
Website: https://joscor.com
-
- Posts: 9
- Joined: Thu Aug 21, 2008 1:36 pm
Re: Iterate
I can only think of two possibilities, the first being that you didn't add the -jar command, the second being that the tar isn't compatible with 1.5 (it works on my machine which is ubuntu 8.04 with java 1.6)
Re: Iterate
how odd, after I rebooted, it worked. Also, I had the -jar option there, as after I rebooted I just scanned history for the command previously entered.
It seemed to have worked great, the only issue I could see was that it didn't like quotation marks around file addresses, eg: "Drivers/Net/*.c" would result in a xxx not found. This makes it hard to use this on folder names with spaces in them.
It seemed to have worked great, the only issue I could see was that it didn't like quotation marks around file addresses, eg: "Drivers/Net/*.c" would result in a xxx not found. This makes it hard to use this on folder names with spaces in them.
Website: https://joscor.com
-
- Posts: 9
- Joined: Thu Aug 21, 2008 1:36 pm
Re: Iterate
Ah well, Java is weird. I would go back and fix the quotes thing... but seeing I'm working on a completely new version of it (and a much better one too, I might add) I don't really want to.
By the way, this project is open source, so if anyone wants to contribute, they should message me. Also, I only have to implement two (or so) more things to get it to the first _usable_ version, the first being the command-line interface, and the second is that I'm attempting to make the .itp filetype not only backwards compatible, but forwards compatible as well.... (don't ask).
EDIT: that may actually not be the quotation marks, I think it has more to do with the asterisk, as I did not implement that functionality (although maybe that is more a part of bash... hmm, ima go experiment now)
By the way, this project is open source, so if anyone wants to contribute, they should message me. Also, I only have to implement two (or so) more things to get it to the first _usable_ version, the first being the command-line interface, and the second is that I'm attempting to make the .itp filetype not only backwards compatible, but forwards compatible as well.... (don't ask).
EDIT: that may actually not be the quotation marks, I think it has more to do with the asterisk, as I did not implement that functionality (although maybe that is more a part of bash... hmm, ima go experiment now)
Re: Iterate
Have you tried http://cloc.sourceforge.net/. I use it myself and find it pretty nice. If you have tried it please let us know why you didn't like it.
Best regards
Christian Lange
Best regards
Christian Lange
-
- Posts: 9
- Joined: Thu Aug 21, 2008 1:36 pm
Re: Iterate
Nope, I've never tried cloc. It looks very comprehensive though, and if I knew about it I may not have written iterate in the first place... When I am done rewriting iterate, it is going to more than just count lines of code, however.