diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000..b909682
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,20 @@
+# EditorConfig is awesome: http://EditorConfig.org
+
+# top-most EditorConfig file
+root = true
+
+# Unix-style newlines with a newline ending every file
+[*]
+end_of_line = lf
+insert_final_newline = false
+charset = utf-8
+indent_style = tab
+trim_trailing_whitespace = true
+
+[*.{cpp,c,h,hpp,cxx}]
+insert_final_newline = true
+
+# Yaml files
+[*.{yml,yaml}]
+indent_style = space
+indent_size = 4
\ No newline at end of file
diff --git a/RoboFile.php b/RoboFile.php
index 7dd95a8..3690d95 100644
--- a/RoboFile.php
+++ b/RoboFile.php
@@ -20,8 +20,13 @@ if ( ! function_exists('glob_recursive'))
*
* @see http://robo.li/
*/
-class RoboFile extends \Robo\Tasks
-{
+class RoboFile extends \Robo\Tasks {
+
+ /**
+ * Directories used by analysis tools
+ *
+ * @var array
+ */
protected $taskDirs = [
'build/api',
'build/coverage',
@@ -41,6 +46,7 @@ class RoboFile extends \Robo\Tasks
$this->phploc(TRUE);
$this->dependencyReport();
$this->phpcpdReport();
+ $this->phpcsReport();
}
/**
@@ -135,6 +141,20 @@ class RoboFile extends \Robo\Tasks
$this->_run($cmd_parts);
}
+ /**
+ * Run the phpcs tool
+ */
+ public function phpcs()
+ {
+ $cmd_parts = [
+ 'vendor/bin/phpcs',
+ '--standard=./build/phpcs.xml',
+ '--report=summary'
+ ];
+
+ $this->_run($cmd_parts);
+ }
+
/**
* Run the phploc tool
*
@@ -145,6 +165,7 @@ class RoboFile extends \Robo\Tasks
// Command for generating reports
$report_cmd_parts = [
'vendor/bin/phploc',
+ '--count-tests',
'--log-csv=build/logs/phploc.csv',
'--log-xml=build/logs/phploc.xml',
'src',
@@ -263,6 +284,19 @@ class RoboFile extends \Robo\Tasks
$this->_run($cmd_parts);
}
+ /**
+ * Generate code style report
+ */
+ protected function phpcsReport()
+ {
+ $cmd_parts = [
+ 'vendor/bin/phpcs',
+ '--standard=./build/phpcs.xml',
+ '--report-xml=./build/logs/phpcs.xml'
+ ];
+ $this->_run($cmd_parts);
+ }
+
/**
* Short cut for joining an array of command arguments
* and then running it
diff --git a/build/CodeIgniter-for-PHP_CodeSniffer b/build/CodeIgniter-for-PHP_CodeSniffer
new file mode 160000
index 0000000..b501f01
--- /dev/null
+++ b/build/CodeIgniter-for-PHP_CodeSniffer
@@ -0,0 +1 @@
+Subproject commit b501f01403216a917754e3f76ba7022d4ad37a4e
diff --git a/build/phpcs.xml b/build/phpcs.xml
new file mode 100644
index 0000000..419771f
--- /dev/null
+++ b/build/phpcs.xml
@@ -0,0 +1,53 @@
+
+
+ A variation of the CodeIgniter standard
+
+ ../src/
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/build/phpdox.xml b/build/phpdox.xml
index 73d9693..7ec37a2 100644
--- a/build/phpdox.xml
+++ b/build/phpdox.xml
@@ -48,6 +48,7 @@
+
@@ -84,11 +85,9 @@
-