Menu

[r156]: / trunk / PhpCheckstyle / runFromWeb.php  Maximize  Restore  History

Download this file

34 lines (24 with data), 936 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
define("PHPCHECKSTYLE_HOME_DIR", dirname(__FILE__));
require_once PHPCHECKSTYLE_HOME_DIR."/src/PHPCheckstyle.php";
require_once PHPCHECKSTYLE_HOME_DIR."/src/util/Utility.php";
// default values
$options['exclude'] = array();
$options['format'] = "html"; // default format
$options['config'] = "default.cfg.xml";
$options['debug'] = false;
$options['progress'] = true;
$lineCountFile = null;
define("CONFIG_FILE", $options['config']);
define("DEBUG", $options['debug']);
// Get user selection
$sourceDir = $_POST['sourceDir'];
$resultDir = $_POST['resultDir'];
//
$formats = explode(',', $options['format']);
// Launch PHPCheckstyle
$style = new PHPCheckstyle($formats, $resultDir, $lineCountFile, $options['progress']);
$style->processFiles($sourceDir, $options['exclude']);
echo "Reporting Completed.</BR></BR>";
echo 'Display Results : <a href="'.$resultDir.'">'.$resultDir.'</a>';
?>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.