473,387 Members | 1,790 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

C code stats tool?

Are there any free C code analysis tools available?

/Why Tea

Nov 16 '06 #1
24 2204
Why Tea wrote:
Are there any free C code analysis tools available?

/Why Tea
Well, there's Splint:
http://lclint.cs.virginia.edu/
Nov 16 '06 #2

james of tucson wrote:
Why Tea wrote:
Are there any free C code analysis tools available?

/Why Tea
I didn't mean lint type of tool, sorry. What I meant was a tool that
provided statistics of a code base (might not even compile) so that the
quality of the code could be judged. I used to see a simple tool that
gave total LOC, number of goto's used, number of comments, etc...

/Why Tea

Nov 17 '06 #3
Why Tea a écrit :
james of tucson wrote:
>>Why Tea wrote:
>>>Are there any free C code analysis tools available?

/Why Tea


I didn't mean lint type of tool, sorry. What I meant was a tool that
provided statistics of a code base (might not even compile) so that the
quality of the code could be judged. I used to see a simple tool that
gave total LOC, number of goto's used, number of comments, etc...

/Why Tea
The IDE of lcc-win32 gives you Halstead statistics (software metrics)
lines of code, etc.

http://www.cs.virginia.edu/~lcc-win32
Nov 17 '06 #4
>
The IDE of lcc-win32 gives you Halstead statistics (software metrics)
lines of code, etc.
That looks like a terrific software, will try it out. However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.

Nov 17 '06 #5
Why Tea said:
However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.
The quality will be appalling. It almost always is, you know. :-(

The best metrics software I've seen is McCabe's, but it costs a small
fortune. It's worth every penny, *if* you need high quality metrics badly
enough.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: normal service will be restored as soon as possible. Please do not
adjust your email clients.
Nov 17 '06 #6
Richard Heathfield a écrit :
Why Tea said:

>>However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.


The quality will be appalling. It almost always is, you know. :-(
You are speaking without knowing what are you talking about.
You do not use my software, how can you say that
"the quality will be appalling"???

Because you like to spread your prejudices as if they were
worth something .

jacob
Nov 17 '06 #7
In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:
>Richard Heathfield a écrit :
>Why Tea said:
>>>However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.
>The quality will be appalling. It almost always is, you know. :-(
>You are speaking without knowing what are you talking about.
You do not use my software, how can you say that
"the quality will be appalling"???
Are we to infer that Tea inherited the tens of thousands of lines of C
from *you* ??

Richard's remark about the quality being appalling was a reference
to Tea's inherited code, not a reference to the tools provided by lcc.
--
"It is important to remember that when it comes to law, computers
never make copies, only human beings make copies. Computers are given
commands, not permission. Only people can be given permission."
-- Brad Templeton
Nov 17 '06 #8
Walter Roberson a écrit :
In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:
>>Richard Heathfield a écrit :
>>>Why Tea said:

>>>>However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.

>>>The quality will be appalling. It almost always is, you know. :-(

>>You are speaking without knowing what are you talking about.
You do not use my software, how can you say that
"the quality will be appalling"???


Are we to infer that Tea inherited the tens of thousands of lines of C
from *you* ??

Richard's remark about the quality being appalling was a reference
to Tea's inherited code, not a reference to the tools provided by lcc.
Yes it could be, but he answered the wrong thread then...

Tea was referring to the tools I proposed. He could have answered
to the right thread. But OK, he can't use Usenet after all this years.

Forget it
Nov 17 '06 #9

jacob navia wrote:
Richard Heathfield a écrit :
Why Tea said:
>However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.
The quality will be appalling. It almost always is, you know. :-(

You are speaking without knowing what are you talking about.
He was making a joke; and in my experience, he's quite right.
You do not use my software, how can you say that
"the quality will be appalling"???
What does your software have to do with it? Are you saying you supplied
the code which Why Tea wishes to analyze?
Because you like to spread your prejudices as if they were
worth something .
What are you on about?

Nov 17 '06 #10
[No snippage this time, alas.]

jacob navia said:
Walter Roberson a écrit :
>In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:
>>>Richard Heathfield a écrit :
Why Tea said:
>>>>>However, I was
>after more of a command line type of software metrics tool to get the
>stats and a feel of the quality of the tens of thousands of lines of C
>code inherited.
Here, it is clear that "Why Tea" is referring to the quality of his
inherited code base.
>>>>The quality will be appalling. It almost always is, you know. :-(
Here, it is clear that I was referring to "Why Tea"'s code base, too.
>>>You are speaking without knowing what are you talking about.
Here, it is clear that Mr Navia is talking to himself.
>>>You do not use my software, how can you say that
"the quality will be appalling"???
Well, I didn't. Whether I can or not is neither here nor there, although I
could make a shrewd guess, based on your contributions to comp.lang.c.
>Are we to infer that Tea inherited the tens of thousands of lines of C
from *you* ??

Richard's remark about the quality being appalling was a reference
to Tea's inherited code, not a reference to the tools provided by lcc.

Yes it could be,
Yes, it was.
but he answered the wrong thread then...
No, I didn't.
Tea was referring to the tools I proposed.
No, he wasn't.
He could have answered to the right thread.
I did.
But OK, he can't use Usenet after all this years.
Yes, I can.
Forget it
Gladly.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: normal service will be restored as soon as possible. Please do not
adjust your email clients.
Nov 17 '06 #11
In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:
>Walter Roberson a écrit :
>In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:
>>>Richard Heathfield a écrit :
>>>>Why Tea said:
>>>>>However, I was
>after more of a command line type of software metrics tool to get the
>stats and a feel of the quality of the tens of thousands of lines of C
>code inherited.
>>>>The quality will be appalling. It almost always is, you know. :-(
>Richard's remark about the quality being appalling was a reference
to Tea's inherited code, not a reference to the tools provided by lcc.
>Yes it could be, but he answered the wrong thread then...
>Tea was referring to the tools I proposed. He could have answered
to the right thread. But OK, he can't use Usenet after all this years.
Jacob, I know that your native language is not English; it appears
that you have accidently misread Richard's response.

In English, Richard's use of "the quality" without further
qualification of which quality, refers back to the closest
prior reference to "quality". The closest prior reference was in
the phrase "the quality of the tens of tousands of lines of C
code inherited". So in English, Richard's "appalling" adjective
modifies the inherited code, not the software metrics tools.

In English, in order for Richard to have been referring to the tools,
his sentance would have had to have been something like,
"The quality of the tools will be appalling."

So Richard's remark was not directed at your tools, but his
remark was in direct response to Tea's mention of quality, so
Richard's remark was -not- to the wrong part of the thread.
--
There are some ideas so wrong that only a very intelligent person
could believe in them. -- George Orwell
Nov 17 '06 #12
Walter Roberson a écrit :
In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:
>>Walter Roberson a écrit :
>>>In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:

>>>>Richard Heathfield a écrit :

>>>>>Why Tea said:

>>>>>>However, I was
>>after more of a command line type of software metrics tool to get the
>>stats and a feel of the quality of the tens of thousands of lines of C
>>code inherited.

>>>>>The quality will be appalling. It almost always is, you know. :-(

>>>Richard's remark about the quality being appalling was a reference
to Tea's inherited code, not a reference to the tools provided by lcc.

>>Yes it could be, but he answered the wrong thread then...

>>Tea was referring to the tools I proposed. He could have answered
to the right thread. But OK, he can't use Usenet after all this years.


Jacob, I know that your native language is not English; it appears
that you have accidently misread Richard's response.

In English, Richard's use of "the quality" without further
qualification of which quality, refers back to the closest
prior reference to "quality". The closest prior reference was in
the phrase "the quality of the tens of tousands of lines of C
code inherited". So in English, Richard's "appalling" adjective
modifies the inherited code, not the software metrics tools.

In English, in order for Richard to have been referring to the tools,
his sentance would have had to have been something like,
"The quality of the tools will be appalling."

So Richard's remark was not directed at your tools, but his
remark was in direct response to Tea's mention of quality, so
Richard's remark was -not- to the wrong part of the thread.
Yes, I think I am getting a bit paranoic.

Excuse me.

Sorry mr heathfield, I misunderstood.

Nov 17 '06 #13
jacob navia said:

<snip>
Sorry mr heathfield, I misunderstood.
No problem. Let's move on.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: normal service will be restored as soon as possible. Please do not
adjust your email clients.
Nov 17 '06 #14
The IDE of lcc-win32 gives you Halstead statistics (software metrics)
lines of code, etc.

http://www.cs.virginia.edu/~lcc-win32
I had problem downloading the advanced.pdf file. Any idea what is the
problem?

Nov 17 '06 #15
Why Tea a écrit :
>>The IDE of lcc-win32 gives you Halstead statistics (software metrics)
lines of code, etc.

http://www.cs.virginia.edu/~lcc-win32


I had problem downloading the advanced.pdf file. Any idea what is the
problem?
Nothing. Just scroll down in the link to
"Now let me to the downloads"

We were forced to put all those ads to somehow finance
the server costs and the bandwidth used by lcc-win32...

Nov 17 '06 #16
I had problem downloading the advanced.pdf file. Any idea what is the
problem?
Nothing. Just scroll down in the link to
"Now let me to the downloads"

We were forced to put all those ads to somehow finance
the server costs and the bandwidth used by lcc-win32...
I did that and managed to download all other files except the
advanced.pdf.

Nov 17 '06 #17
On 16 Nov 2006 22:28:31 -0800, "Why Tea" <yt****@gmail.comwrote:
>
james of tucson wrote:
>Why Tea wrote:
Are there any free C code analysis tools available?

/Why Tea

I didn't mean lint type of tool, sorry. What I meant was a tool that
provided statistics of a code base (might not even compile) so that the
quality of the code could be judged. I used to see a simple tool that
gave total LOC, number of goto's used, number of comments, etc...

/Why Tea
Sounds like you need grep and wc.

--
Al Balmer
Sun City, AZ
Nov 17 '06 #18
Why Tea" <yt****@gmail.comwrote:
... However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.
These may help:

http://www.dwheeler.com/sloccount
http://csdl.ics.hawaii.edu/Tools/SCLC

Roberto Waltman
Nov 17 '06 #19

Roberto Waltman wrote:
Why Tea" <yt****@gmail.comwrote:
... However, I was
after more of a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code inherited.

These may help:

http://www.dwheeler.com/sloccount
http://csdl.ics.hawaii.edu/Tools/SCLC
Thanks Roberto. That's exactly what I'm looking for.

/Why Tea

Nov 17 '06 #20
"Why Tea" wrote:
>Roberto Waltman wrote:
>Why Tea" wrote:
... a command line type of software metrics tool to get the
stats and a feel of the quality of the tens of thousands of lines of C
code ...
...
http://www.dwheeler.com/sloccount
http://csdl.ics.hawaii.edu/Tools/SCLC

Thanks Roberto. That's exactly what I'm looking for.
Welcome. Forgot this one: http://sourceforge.net/projects/cccc

Roberto Waltman
Nov 17 '06 #21
On Fri, 17 Nov 2006 10:25:41 +0100, in comp.lang.c , jacob navia
<ja***@jacob.remcomp.frwrote:
>Walter Roberson a écrit :
>In article <45**********************@news.orange.fr>,
jacob navia <ja***@jacob.remcomp.frwrote:
>>>Richard Heathfield a écrit :

Why Tea said:
>>>>>after more of a command line type of software metrics tool to get the
>stats and a feel of the quality of the tens of thousands of lines of C
>code inherited.
>>>>The quality will be appalling. It almost always is, you know. :-(
>>>You are speaking without knowing what are you talking about.
You do not use my software, how can you say that
"the quality will be appalling"???

Richard's remark about the quality being appalling was a reference
to Tea's inherited code, not a reference to the tools provided by lcc.

Yes it could be, but he answered the wrong thread then...
No he didn't, you just assumed he was insulting you and jumped down
his throat. The thread makesit totally clear that he was commenting on
the probable "quality of the tens of thousands of lines of C".
--
Mark McIntyre

"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan
Nov 17 '06 #22
"Why Tea" <yt****@gmail.comwrote:
james of tucson wrote:
Why Tea wrote:
Are there any free C code analysis tools available?

I didn't mean lint type of tool, sorry. What I meant was a tool that
provided statistics of a code base (might not even compile) so that the
quality of the code could be judged. I used to see a simple tool that
gave total LOC, number of goto's used, number of comments, etc...
Be careful. Such statistics are a very dubious measure of the real
quality of code, and they're easy to trick. LOC is very simple to pad or
unpad. Number of gotos used is relevant, but should be zero for by far
most files anyway. Number of comments _looks_ relevant, but I've seen
too many comments saying /* Declare global variables here */ or some
such informationless template work to care about their number: their
internal quality is what counts, and you can't get a statistic of that.
/Why Tea
Why? Why, because! Tea because tea because Assam and Chun Mee and
jasmine and... (Yeah, I'm addicted. I know.)

Richard
Nov 21 '06 #23
Be careful. Such statistics are a very dubious measure of the real
quality of code, and they're easy to trick. LOC is very simple to pad or
unpad. Number of gotos used is relevant, but should be zero for by far
most files anyway. Number of comments _looks_ relevant, but I've seen
too many comments saying /* Declare global variables here */ or some
such informationless template work to care about their number: their
internal quality is what counts, and you can't get a statistic of that.
Thanks Richard, I just like to have a feel of how big the code base is.
I just ran one of those tools through one of the subsystems, and there
were over 6 millions LOC's with about 40% of them commented. The info
doesn't tell me how good is the quality of the code, but it's big! My
original guess was about 1 million LOC's only.

In most cases, a good software company follows strict processes in
software design methodology, coding standard, peer reviews, etc. By
looking into the processes and if everyone follows them is probably a
good way to know if the company is making an effort in producing
quality software, hence writing good code.
>
/Why Tea

Why? Why, because! Tea because tea because Assam and Chun Mee and
jasmine and... (Yeah, I'm addicted. I know.)
That's a good one...

Nov 21 '06 #24
Why Tea wrote:
Be careful. Such statistics are a very dubious measure of the real
quality of code, and they're easy to trick. LOC is very simple to pad or
unpad. Number of gotos used is relevant, but should be zero for by far
most files anyway. Number of comments _looks_ relevant, but I've seen
too many comments saying /* Declare global variables here */ or some
such informationless template work to care about their number: their
internal quality is what counts, and you can't get a statistic of that.

Thanks Richard, I just like to have a feel of how big the code base is.
I just ran one of those tools through one of the subsystems, and there
were over 6 millions LOC's with about 40% of them commented. The info
doesn't tell me how good is the quality of the code, but it's big! My
original guess was about 1 million LOC's only.
<snip>

Care to explain the reluctance to provide attributions to quoted
material?

Nov 21 '06 #25

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Bob II | last post by:
Hey, I've never used PHP before. I was wondering if it is possible to use PHP to generate web stats. My web host's stats aren't very good. So I want to generate some custom stats for myself. ...
8
by: David Girard | last post by:
I'm getting the following error which is no big deal - the problem is it is LOCATION specific - which has me really baffled... for some reason the error only appears on different machines in...
3
by: Tommo | last post by:
Hello All, I am a still learning so be easy on me. I am trying to get some code to work that is using JS and Perl/CGI, I am using AS Perl and an Apache Server on XP as the webserver. Can anyone...
68
by: Steve | last post by:
Hi There, Prob a simple answer to this (I hope) but I can't quite work it out yet... I have this in a page: <map name="Map"> <area shape="rect" coords="43,68,52,77" href="map.html"...
0
by: Nailah Ogeer | last post by:
Hi all, Just wondering if someone could help me with this rather specific problem. I am trying to figure out where i should insert some code that basically resets stats after a certain number of...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching Statistics" and the "Translated Pitching Statistics"...
15
by: l3vi | last post by:
I have a new system Im building that stores entries of what people are searching for on my sites. I want to be able to keep records of how many times a keyword was searched for daily, and from...
53
by: Hexman | last post by:
Hello All, I'd like your comments on the code below. The sub does exactly what I want it to do but I don't feel that it is solid as all. It seems like I'm using some VB6 code, .Net2003 code,...
0
by: Badino | last post by:
Hi, Can someone tell me what to put in this code so that if a user selects 0 (Black) then make the font white (0) as my default colour is black on my Excel spreadsheet. Private Type...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.