<commit_before>SoCRocket Coding Style Guide {#codingstyle_p}
============================

The SoCRocket Coding Style Guide is derived from the Google C++ Style Guide 
(Revision 3.274, http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml)

Many thanks to Google and <NAME>, <NAME>, 
<NAME>, <NAME> and<NAME> for their excelent style guide.

To ensure the usage of that Style Guide serveral helper tools are in place to support 
the development cycle.

To check the coding style use the script "tools/cpplint". It is simply called:
~~~
./tool/cpplint <filename> ...
~~~
All files can be checked with:
~~~
./waf cpplint
~~~
Furthermore to simpliefy the migration process of old/other code to the codingstyle you may use "uncrustify":
http://uncrustify.sourceforge.net/

A configuration is availabe in tools/uncrustify.cfg. Make sure you use at least version 0.60. It can be used with:
~~~
uncrustify -c tools/uncrustify.cfg --replace <filename>
~~~

To update/add header guards in a coding style compliant way the script "tools/fixheaderguards.py" can be used. The script was originally created by <NAME> and slightly adapted to our coding style. The original is available here: https://bitbucket.org/mpreisler/include-guard-fixer/

Just run it from the project root with:
~~~
tools/fixheaderguards.py <filename>
~~~

Coding Style done in the SoCRocket Week 2014-6
----------------------------------------------

Model        | Lint | GUARDS | DOCS | DOCSUP | DOXY | CONF | REGS  
------------ | ---- | ------ | ---- | ------ | ---- | ---- | ----
ahbcamera    | OK   |  OK    | OK   |        | OK   |      |     
ahbctrl      | OK   |  OK    | OK   |        | OK   |      |     
ahbdisplay   | OK   |  OK    | OK   |        | OK   |      |     
ahbin        | OK   |  OK    | OK   |        |      |      |     
ahbmem       | OK   |  OK    | OK   |        | OK   |      |     
ahbout       | OK   |  OK    | OK   |        |      |      |     
ahbprof      | OK   |  OK    | OK   |        | OK   |      |     
ahbshuffler  | OK   |  OK    | OK   |        | OK   |      |     
ahbspacewire |      |  OK    |      |        |      |      |     
ahbudp       | OK   |  OK    |      |        | OK   |      |     
apbctrl      | OK   |  OK    | OK   |        |      |      |     
apbuart      | OK   |  OK    | OK   |        |      |      |     
gptimer      | OK   |  OK    | OK   |        | OK   |      |     
greth        |      |        |      |        |      |      |     
irqmp        | OK   |  OK    | OK   | OK     |      |      |     
mctrl        | RM   |  OK    | OK   |        |      |      |     
memory       | OK   |  OK    | OK   | OK     | OK   |      |     
mips         | OK   |        |      | OK     |      |      |     
mmu_cache    | TS   |        |      |        |      |      |     
socwire      |      |  OK    |      |        |      |      |     
stimgen      | OK   |  OK    |      |        |      |      |     
utils        | OK   |  OK    | OK   |        | OK   | --   |     
common       | RM   |        |      |        |      | --   |  
leon3mp      |      |        |      |        |      |      |<commit_msg>this closes #444 @1h<commit_after>SoCRocket Coding Style Guide {#codingstyle_p}
============================

The SoCRocket Coding Style Guide is derived from the Google C++ Style Guide 
(Revision 3.274, http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml)

Many thanks to Google and <NAME>, <NAME>, 
<NAME>, <NAME> and<NAME> for their excellent style guide.

To ensure the usage of that Style Guide several helper tools are in place to support 
the development cycle.

To check the coding style use the script `tools/cpplint`. It is simply called:
    
    $ ./tool/cpplint <filename> ...
       
All files can be checked with:
   
    $ ./waf cpplint
       
Furthermore to simplify the migration process of old code to the codingstyle you may use the tool `uncrustify` which is available here: http://uncrustify.sourceforge.net/

A configuration is availabe in `tools/uncrustify.cfg`. Make sure you use at least version 0.60 of `uncrustify`. It can be used like this:
   
    $ uncrustify -c tools/uncrustify.cfg --replace <filename>

To update/add header guards in a coding style compliant way the script `tools/fixheaderguards.py` can be used. The script was originally created by <NAME> and slightly adapted to our coding style. The original is available here: https://bitbucket.org/mpreisler/include-guard-fixer/

Just run it from the project root like this:
   
    $ tools/fixheaderguards.py <filename>
       

Coding Style adjustments done in the SoCRocket Week 2014-6
----------------------------------------------------------

| Model        | Lint | GUARDS | DOCS | DOCSUP | DOXY | CONF | REGS |  
|--------------|------|--------|------|--------|------|------|------|
| ahbcamera    | OK   |  OK    | OK   |        | OK   |      |      |
| ahbctrl      | OK   |  OK    | OK   |        | OK   |      |      |
| ahbdisplay   | OK   |  OK    | OK   |        | OK   |      |      |
| ahbin        | OK   |  OK    | OK   |        |      |      |      |
| ahbmem       | OK   |  OK    | OK   |        | OK   |      |      |
| ahbout       | OK   |  OK    | OK   |        |      |      |      |
| ahbprof      | OK   |  OK    | OK   |        | OK   |      |      |
| ahbshuffler  | OK   |  OK    | OK   |        | OK   |      |      |
| ahbspacewire |      |  OK    |      |        |      |      |      |
| ahbudp       | OK   |  OK    |      |        | OK   |      |      |
| apbctrl      | OK   |  OK    | OK   |        |      |      |      |
| apbuart      | OK   |  OK    | OK   |        |      |      |      |
| gptimer      | OK   |  OK    | OK   |        | OK   |      |      |
| greth        |      |        |      |        |      |      |      |
| irqmp        | OK   |  OK    | OK   | OK     |      |      |      |
| mctrl        | RM   |  OK    | OK   |        |      |      |      |
| memory       | OK   |  OK    | OK   | OK     | OK   |      |      |
| mips         | OK   |        |      | OK     |      |      |      |
| mmu_cache    | TS   |        |      |        |      |      |      |
| socwire      |      |  OK    |      |        |      |      |      |
| stimgen      | OK   |  OK    |      |        |      |      |      |
| utils        | OK   |  OK    | OK   |        | OK   | --   |      |
| common       | RM   |        |      |        |      | --   |      |
| leon3mp      |      |        |      |        |      |      |      |
{'fraction_non_alphanumeric': 0.14169481117592878, 'fraction_numerical': 0.00460546515198035, 'mean_word_length': 1.0941819350691095, 'pattern_counts': {'":': 1, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 57, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '885466', 'n_tokens_mistral': 2104, 'n_tokens_neox': 2036, 'n_words': 558}