Difference between revisions of "Code Janitorial"

From VideoLAN Wiki
Jump to navigation Jump to search
Line 1: Line 1:
 
Here is some samples janitorial task you can pick up:
 
Here is some samples janitorial task you can pick up:
 +
 +
=== General appearance ===
 +
 +
Keeping the source uniformly less than 78 characters wide so it and patches both fit nicely on a 80 column screen is good general practice but it doesn't always happen. Thus an opportunity to reformat clearly overlong lines.
 +
  
 
=== Function header ===
 
=== Function header ===
* The function header commentary isn't uniformed across files. We suggest you to try to tidy this.
+
The function header commentary isn't uniformed across files. We suggest you to try to tidy this.
  
 
  /**************************************************************************  |
 
  /**************************************************************************  |
   * Get the Media descriptor associated with the instance                  *  | <- This is the function header commentary
+
   * Get the Media descriptor associated with the instance                  *  | <- function header commentary
 
   **************************************************************************/ |
 
   **************************************************************************/ |
 
  libvlc_media_descriptor_t *
 
  libvlc_media_descriptor_t *
Line 14: Line 19:
 
   ...
 
   ...
 
  }
 
  }
 +
 +
=== Janitorial commits ===
 +
 +
Please, please do not mix cosmetic (reformatting and so on) changes with changes that alter code behaviour in the same commit. Put them in a separate commit marked with <code>Cosmetic: (description here)</code>. Make sure the changes compile before you commit anyway.

Revision as of 13:41, 28 July 2009

Here is some samples janitorial task you can pick up:

General appearance

Keeping the source uniformly less than 78 characters wide so it and patches both fit nicely on a 80 column screen is good general practice but it doesn't always happen. Thus an opportunity to reformat clearly overlong lines.


Function header

The function header commentary isn't uniformed across files. We suggest you to try to tidy this.

/**************************************************************************  |
 * Get the Media descriptor associated with the instance                  *  | <- function header commentary
 **************************************************************************/ |
libvlc_media_descriptor_t *
libvlc_media_instance_get_media_descriptor(
                           libvlc_media_instance_t *p_mi,
                           libvlc_exception_t *p_e )
{
  ...
}

Janitorial commits

Please, please do not mix cosmetic (reformatting and so on) changes with changes that alter code behaviour in the same commit. Put them in a separate commit marked with Cosmetic: (description here). Make sure the changes compile before you commit anyway.