coapp-developers team mailing list archive
-
coapp-developers team
-
Mailing list archive
-
Message #00521
Spec for coapp-scan
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.