Differences

This shows you the differences between two versions of the page.

dev:automated_check [2006/01/23 12:41]
editor created
dev:automated_check [2009/07/06 20:36] (current)
Line 1: Line 1:
 +====== Automated Checks ======
 +Sahana has some automated checks in the form of perl and bash scripts to check the adherance of the code to the coding conventions. This especially guides new developers and allows the release team to automatically inspect the stability of code. The automated checks are located in the **/test/code/** directory of the CVS code sahana-phase2 module.
 +
 +===== Checks available =====
 +__Master Check__
 +  * check - Is the master check and performs all available checks on the code base (php, html, css, etc)
 +
 +__Check Scripts__
 +  * check_php - Runs all the php only file checks (anything that is prefixed with check_php_
 +  * check_php_license - checks for the existance of the LGPL license
 +  * check_php_namespace - checks for conflicts in the function namespace
 +
 +__Inspection Tools__
 +  * list_shn_namespace - alphabetically lists all the functions begining with shn_
 +
 +===== Using the scripts =====
 +Except for the master check the check scripts require you to pipe in the list of files to be checked into STDIN.
 +
 +  e.g. <file list generator> | <check script>
 +
 +File list generators can for example
 +
 +  ls *.php | check_php_license
 +  find *.inc | check_php_namespace
 +  test/code/find_phpcode | check_php
 +
 +__find scripts__
 +Find scripts allow you to easily list a subset of files you are looking for. Find scripts available are:
 +
 +  * find_phpcode - searches all the *.php and *.inc files recursively
 +
 +  find_phpcode - will recursively search on the current director
 +  find_phpcode ../mod ../inc ../conf - will search mod inc and conf directories
 +

Navigation
  • Navigate