Skip to content

Commit 266d81c

Browse files
jatitoampuneet0191
authored andcommitted
Added back codestyle checks via Drone (#167)
* Code styling compliance with joomla/coding-standards + code dependency * File headers * Code styling and compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Empty commit * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Added back travis file for code standards compliance * Coding standards * Travis * CS fixes after merging to latest develop * Added back old php versions from 5.5 and on * Used composer update for old versions of php * Fixed php version builds and fixed v.2.3.7 for Codeception * Fixed Travis build matrix * Empty push to force build * Switched from Travis to Drone for phpcs checks * Removed extra image * Codeception v.2.4 compatibility
1 parent 69fae8e commit 266d81c

File tree

6 files changed

+2905
-542
lines changed

6 files changed

+2905
-542
lines changed

.drone.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
pipeline:
2+
phpcs:
3+
image: composer:latest
4+
commands:
5+
- echo $(date)
6+
- composer install --prefer-dist --no-progress --no-interaction
7+
- vendor/bin/robo check:codestyle
8+
- echo $(date)

RoboFile.php

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,47 @@
11
<?php
2-
32
/**
43
* This is project's console commands configuration for Robo task runner.
54
*
6-
* @see http://robo.li/
5+
* Download robo.phar from http://robo.li/robo.phar and type in the root of the repo: $ php robo.phar
6+
* Or do: $ composer update, and afterwards you will be able to execute robo like $ php vendor/bin/robo
7+
*
8+
* @package JoomlaBrowser
9+
*
10+
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
11+
* @license GNU General Public License version 2 or later; see LICENSE.txt
12+
* @see http://robo.li/
13+
*
14+
* @since 1.0.0
715
*/
16+
817
class RoboFile extends \Robo\Tasks
918
{
1019
// Load tasks from composer, see composer.json
11-
use Joomla\Testing\Robo\Tasks\loadTasks;
20+
use Joomla\Testing\Robo\Tasks\LoadTasks;
1221

1322
/**
1423
* Check the code style of the project against a passed sniffers using PHP_CodeSniffer_CLI
1524
*
1625
* @param string $sniffersPath Path to the sniffers. If not provided Joomla Coding Standards will be used.
26+
* @return void
1727
*/
1828
public function checkCodestyle($sniffersPath = null)
1929
{
2030
if (is_null($sniffersPath))
2131
{
22-
$sniffersPath = __DIR__ . '/.travis/phpcs/Joomla';
32+
$sniffersPath = __DIR__ . '/.tmp/coding-standards';
2333
}
2434

2535
$this->taskCodeChecks()
2636
->setBaseRepositoryPath(__DIR__)
2737
->setCodeStyleStandardsFolder($sniffersPath)
28-
->setCodeStyleCheckFolders(['/src'])
38+
->setCodeStyleCheckFolders(
39+
array(
40+
'src'
41+
)
42+
)
2943
->checkCodeStyle()
3044
->run()
3145
->stopOnFail();
3246
}
33-
}
47+
}

composer.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,22 @@
1616
],
1717
"require": {
1818
"php" : ">=5.5.9",
19-
"consolidation/robo" : "~1"
19+
"consolidation/robo" : "^1",
20+
"symfony/console" : "~3|~4",
21+
"symfony/filesystem" : "~3|~4",
22+
"symfony/finder" : "~3|~4",
23+
"symfony/process" : "~3|~4",
24+
"symfony/yaml" : "~3|~4"
2025
},
2126
"require-dev": {
22-
"joomla-projects/joomla-testing-robo" : "~1.0"
27+
"joomla-projects/joomla-testing-robo" : "dev-container-test",
28+
"codeception/codeception" : "~2.4"
2329
},
2430
"autoload": {
2531
"psr-4": {
2632
"Codeception\\Module\\" : "src"
2733
}
28-
}
34+
},
35+
"minimum-stability" : "dev",
36+
"prefer-stable" : true
2937
}

0 commit comments

Comments
 (0)