← Back to team overview

coapp-developers team mailing list archive

Re: Spec for coapp-scan

 

(including mailing list... remember to 'reply-all' :)
Well, the scan tool is for scanning source code-including flags found in the source code reflecting 64/32 bitness etc.

Essentially that all shows up as just a bunch of #defines one way or another. I've started thinking about the mkSpec tool which is where the smarter part of the analysis will be (ie "X64" == "AMD64" == "EMT64" , etc)

G


Garrett Serack | Open Source Software Developer | Microsoft Corporation
I don't make the software you use; I make the software you use better on Windows.

From: Eric Schultz [mailto:wwahammy@xxxxxxxxx]
Sent: Wednesday, July 14, 2010 12:54 PM
To: Garrett Serack
Subject: Re: [Coapp-developers] Spec for coapp-scan

I'm not sure if you intend platform to also handle 32-bit versus 64-bit versions, will that kind of information be read by the scan?

Eric
On Wed, Jul 14, 2010 at 9:51 AM, Garrett Serack <garretts@xxxxxxxxxxxxx<mailto:garretts@xxxxxxxxxxxxx>> wrote:
Sketching out how the source-code scanner tool should be work. I'm not entirely sure right now what else (above #defines, #ifdef #if etc...) it can pull from the source code. But this should be a good start.

CoApp-scan [options] <source-root-path>

    <source-root-path>          the root of the source tree to collect data from

    Options:
    --------
    --output-file=<file>        dumps the scan output to the specified <file>
                                defaults to .\scan-output.xml
    --ignore=<file or dir>      ignores the given file or directory from the scan


Given a source-root-path, it should recursively scan thru the folders examining each file and produce a report.
I'm not married to this format for XML; if there is something better, by all means go for it.

<?xml version="1.0" encoding="utf-8" ?>
<report>
    <files>
        <!-- list all .c .cpp .cxx .h .hpp .hxx .rc .asm etc... -->
        <file id="1" path=".\directory" name="foo.c" type="source" >
            <!-- path is relative to source-root-path on the command line -->
            <includes>
                <file index="4" />
            </inlcudes>
        </file>

        <file id="2" path=".\directory" name="bar.c" type="source" />
        <file id="3" path=".\directory" name="bin.c" type="source" />

        <file id="4" path=".\directory" name="baz.h" type="source" >
            <includedby>
                <file index="1" />
            </includedby>
        </file>

        <!-- list all .mak makefiles etc... -->
        <file id="5" path=".\directory" name="makefile" type="buildfile"  />
        <file id="6" path=".\directory" name="foo.mak" type="buildfile" />
        <file id="7" path=".\directory" name="build.xml" type="buildfile" />

        <!-- list all .js .vbs .sh .ps1 .wsh .py .pl .php etc... -->
        <file id="8" path=".\directory" name="test.bat" type="script" />

        <!-- list all .png .gif .avi .mkv .ico .wav .mp3 etc... -->
        <file id="9" path=".\directory" name="bell.wav" type="media" />

        <!-- list all PE binaries .exe .dll .sys etc... -->
        <file id="10" path=".\directory" name="something.dll" type="pebinary" />

        <!-- list all library files -->
        <file id="11" path=".\directory" name="zlib1.lib" type="library" />

        <!-- list all other files -->
        <file id="12" path=".\directory" name="otherfile.txt" type="unknown" />

    </files>

    <defines>
        <define name="PLATFORM" >
            <values>
                <value>windows</value>
                <value>linux</value>
                <value>bsd</value>
            </values>
            <usedin>
                <file index="1" />
                <file index="3" />
            </usedin>
        </define>
    </defines>

</report>

[Description: fearthecowboy]<http://fearthecowboy.com/>

Garrett Serack | Microsoft's Open Source Software Developer | Microsoft Corporation
Office:(425)706-7939                                       email/messenger: garretts@xxxxxxxxxxxxx<mailto:garretts@xxxxxxxxxxxxx>
blog: http://fearthecowboy.com<http://fearthecowboy.com/>                                      twitter: @fearthecowboy<http://twitter.com/fearthecowboy>

I don't make the software you use; I make the software you use better on Windows.







_______________________________________________
Mailing list: https://launchpad.net/~coapp-developers
Post to     : coapp-developers@xxxxxxxxxxxxxxxxxxx<mailto:coapp-developers@xxxxxxxxxxxxxxxxxxx>
Unsubscribe : https://launchpad.net/~coapp-developers
More help   : https://help.launchpad.net/ListHelp

GIF image


References