Creating or Modifying an OACR Project
Windows Driver Kit: Driver Development Tools
Creating or Modifying an OACR Project

Microsoft Auto Code Review (OACR) uses projects to organize and control the code review settings for a build unit. If you want to customize the default projects or create your own project, you can edit the settings in the Oacr.ini file. The location of the Oacr.ini file is in the WinDDK\version\bin\arch\OACR directory.

Creating a Project

WDKSamples is the default name for a project built under the Windows DDK directory (%BASEDIR%). Anything built outside of the %BASEDIR% of the WDK takes the name root.

  1. To create and name your own project, copy the section that describes the existing WDKSamples project in the Project Defaults section of the Oacri.ini file:

    ; project 'WDKSamples': the code under src; relies on %_NTROOT%/project.mk
    [WDKSamples]
    ; WarningLocations=^%BASEDIR%\\src
    WarningNumbers=<all>;!<level4>;
    ErrorNumbers=<level0>;<level1>
    ; Use PFD's settings for these
    PREfastOptions=/MAXPATHS=256 /STACKHOGTHRESHOLD=1024
    %_PREFAST_CYCLOMATIC%=2147483647
    %PREFAST_DRIVERS%=1
    [WDKSamples:x86] 
    [WDKSamples:x86fre] 
    [WDKSamples:x86chk] 
    [WDKSamples:amd64] 
    [WDKSamples:amd64fre] 
    [WDKSamples:amd64chk]

  2. Paste the WDKSamples project in the Project Defaults section, after WDKSamples and root projects. Edit the settings in the copy you made of the WDKSamples project. For example, the following project is named myExamples.

    ; project 'myExamples': the code under src; relies on temp/project.mk
    [myExamples]
    ; WarningLocations=^%BASEDIR%\\src
    WarningNumbers=<all>;!<level4>;
    ErrorNumbers=<level0>;<level1>
    ; Use PFD's settings for these
    PREfastOptions=/MAXPATHS=256 /STACKHOGTHRESHOLD=1024
    %_PREFAST_CYCLOMATIC%=2147483647
    %PREFAST_DRIVERS%=1
    [myExamples:x86] 
    [myExamples:x86fre] 
    [myExamples:x86chk] 
    [myExamples:amd64] 
    [myExamples:amd64fre] 
    [myExamples:amd64chk]

  3. To direct OACR to use your new project configuration, place a project.mk file in the root directory of your build directory tree. For example, if your source code is under the temp directory of the C: drive, place the project.mk file in the C:\temp directory. In the project.mk file, add the line to set the _PROJECT_= to the project you created in the Oacr.ini file. For example:

    _PROJECT_=myExamples


Send feedback on this topic
Built on November 19, 2009
© 2009 Microsoft Corporation. All rights reserved.   Terms of Use | Trademarks | Privacy Statement
Page view tracker
Rate the Lightweight library
x
Lightweight builds on ScriptFree (loband) by adding features you've requested: a SearchBox and default code language selection.
Do you like the SearchBox?
Do you like the tabbed code blocks?
How useful is this topic?
Tell us more.
Thanks
x
You're helping to improve MSDN Online.
Feedback
Switch View
Classic
Lightweight Beta
ScriptFree
Switch View