Issue 120637 - Add configure option to run rat scan during build.
Summary: Add configure option to run rat scan during build.
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: configure (show other issues)
Version: 3.4.0
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: Andre
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-21 09:05 UTC by Andre
Modified: 2022-10-28 12:54 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Andre 2012-08-21 09:05:06 UTC
The rat scan is currently run on a regular basis only by the build bot.  That means that the rat scan is only run on trunk and if the build bot fails, which happens frequently at the moment, there is not rat scan at all.

Therefore it is desirable to integrate the rat scan into the build process.
A new configure option --with-rat-scan=<path-to-rat-library> requests the execution of the rat scan during the build.  Juts go to main/instsetoo_native, run build --all and wait.
Comment 1 SVN Robot 2012-08-23 12:34:28 UTC
"af" committed SVN revision 1376463 into trunk:
#i120637# Added new module ext_libraries/ratscan/ and configure switch --with...
Comment 2 SVN Robot 2012-08-23 12:45:31 UTC
"af" committed SVN revision 1376465 into trunk:
#i120637# Fixed version number for rat report.  Removed binary flag from xml ...
Comment 3 Andre 2012-08-23 13:10:20 UTC
Done.

Here is how it works:

1. Add --with-rat-scan to your call to configure.
   In this form bootstrap will download the pre-built rat binaries (platform
   independent jar).
   Append =<path-to-rat-0.8> to specify where on your system the pre-installed
   rat libraries can be found.

2. Run configure and bootstrap as usual.

3. To run the rat scan there are two paths.

3a. Go to main/instsetoo_native, run build --all and wait.

3b. Go to main/saxon and run build --all.  Then run deliver.
    Switch to ext_libraries/ratscan and run build.

4. If everything went well (at the moment only on Linux everything goes well)
   then you can find the rat report in
   ext_libraries/ratscan/<platform>/misc/aoo-3.5-rat-scan-output.html


Notes:

a) The rat scan currently only runs without error on Linux. Well, the actual scan runs without error on all platforms.  The XSLT transformation that creates the html report from the intermediate XML file breaks.  This is because the XML report contains binary data from some files.  The binary data can not be read by saxon, our XSLT transformator.
In order to fix this we have to update the main/rat-excludes file and modify rat to not include binary data.
Sadly saxon does not contain line numbers in its error messages.  Finding the offending binary file in the multi-megabyte XML report is not so easy.

b) The ratscan/ module can not only create the rat report.  It can also produce a list of all files that are excluded from the scan.  This list can help in cleaning the main/rat-excludes file and in keeping it up-to-date.

c) I added a second file besides main/rat-excludes named main/rat-excludes-solver to exclude *all* files in the local (like main/sw/wntmsci12/) and global (main/solver/) solver directory trees from the rat scan.  Using a separate file for this has the advantage that in the list of excluded files (see b above) the solver files can be listed separatley from the other excluded files and therefore not clutter the list.
Comment 4 SVN Robot 2012-08-24 08:19:40 UTC
"af" committed SVN revision 1376858 into trunk:
#i120637# Added license header.