Skip to content

Automated style checking for OpenFOAM code.

License

Notifications You must be signed in to change notification settings

SedFoam/foamStyleCheck

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

foamStyleCheck

Automated style checking for OpenFOAM code using Vera++. Note that this is still a work-in-progress and therefore some rules listed in the OpenFOAM Foundation's style guide have not yet been implemented.

Usage

General

First, install vera++. On Ubuntu:

sudo apt-get install vera++

Next, in the root directory of your project, either clone this repository:

git clone https://github.com/petebachant/foamStyleCheck.git

or add it as a submodule:

git submodule add https://github.com/petebachant/foamStyleCheck.git

Finally, run the style checking script:

./foamStyleCheck/checkStyle

Setting up Travis CI

To integrate with Travis CI, this repository can either be added as a submodule to any OpenFOAM project, as described above, which would allow local testing, or can be cloned separately as part of the Travis testing process, which is configured in the repository's .travis.yml file.

The Travis CI configuration should be modified to ensure vera++ is installed and the checkStyle script is run at some phase in the testing process. If foamStyleCheck was not added as a submodule, then it must be cloned by Travis as well. Any style issues will then cause the Travis build to fail, thereby automating style checking on commits, pull requests, etc.

For an example of the submodule-based workflow, see turbinesFoam.

About

Automated style checking for OpenFOAM code.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Tcl 98.8%
  • Shell 1.2%