Enable Travis-CI integration for PHPCS

This commit is contained in:
Michael Babker 2015-06-16 15:26:06 -04:00
parent cafe878eea
commit 19c6c29626
6 changed files with 137 additions and 41 deletions

21
.gitignore vendored
View File

@ -3,16 +3,19 @@
*.tar.*
# Packages directories #
build/packages
build/packaging
build/releases
/build/packages
/build/packaging
/build/releases
# Build #
build/logs
/build/logs
# IDE & System#
.buildpath
.project
.settings
# IDE & System #
/.buildpath
/.project
/.settings
.DS_Store
.idea
/.idea
# Composer Install #
/vendor

15
.travis.yml Normal file
View File

@ -0,0 +1,15 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- 7.0
matrix:
allow_failures:
- php: 7.0
script:
- sh -c "if [ '$TRAVIS_PHP_VERSION' != '7.0' ]; then vendor/bin/phpcs --report=full --extensions=php -p --standard=build/phpcs/Joomla --ignore=./*tmpl/* administrator/components/com_patchtester; fi"

View File

@ -1,4 +1,4 @@
Patch Tester
Patch Tester [![Build Status](https://travis-ci.org/joomla-extensions/patchtester.png)](https://travis-ci.org/joomla-extensions/patchtester)
=============
Easily apply changes from pull requests.

View File

@ -1,31 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="patchtester" default="build" basedir=".">
<!-- Run all tasks using build target -->
<target name="build" depends="phpcs" />
<!-- Check code style using Joomla Coding Standards -->
<target name="phpcs" description="Generate codestyle report using PHP_CodeSniffer">
<exec executable="phpcs">
<arg value="--report=checkstyle" />
<arg value="--extensions=php" />
<arg value="-p" />
<arg value="--report-file=${basedir}/build/logs/checkstyle.xml" />
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
<arg value="--ignore=${basedir}/*tmpl/*" />
<arg path="${basedir}/administrator/components/com_patchtester" />
</exec>
</target>
<!-- Check code style on Travis-CI based on Joomla Platform -->
<target name="travis-phpcs" description="Generate codestyle report using PHP_CodeSniffer for output on Travis-CI">
<exec executable="phpcs">
<arg value="-p" />
<arg value="-w" />
<arg value="--extensions=php" />
<arg value="--report=full" />
<arg value="--standard=${basedir}/build/phpcs/Joomla" />
<arg value="--ignore=${basedir}/*tmpl/*" />
<arg path="${basedir}/administrator/components/com_patchtester" />
</exec>
</target>
</project>

14
composer.json Normal file
View File

@ -0,0 +1,14 @@
{
"name": "joomla/patchtester",
"type": "project",
"description": "Joomla! Patch Testing Component",
"keywords": ["joomla", "cms"],
"homepage": "https://github.com/joomla-extensions/patchtester",
"license": "GPL-2.0+",
"require": {
"php": ">=5.3.10"
},
"require-dev": {
"squizlabs/php_codesniffer": "~1.5"
}
}

95
composer.lock generated Normal file
View File

@ -0,0 +1,95 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
"This file is @generated automatically"
],
"hash": "8998a2a462401996430b7fb34fbe53ca",
"packages": [],
"packages-dev": [
{
"name": "squizlabs/php_codesniffer",
"version": "1.5.6",
"source": {
"type": "git",
"url": "https://github.com/squizlabs/PHP_CodeSniffer.git",
"reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6f3e42d311b882b25b4d409d23a289f4d3b803d5",
"reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5",
"shasum": ""
},
"require": {
"ext-tokenizer": "*",
"php": ">=5.1.2"
},
"suggest": {
"phpunit/php-timer": "dev-master"
},
"bin": [
"scripts/phpcs"
],
"type": "library",
"extra": {
"branch-alias": {
"dev-phpcs-fixer": "2.0.x-dev"
}
},
"autoload": {
"classmap": [
"CodeSniffer.php",
"CodeSniffer/CLI.php",
"CodeSniffer/Exception.php",
"CodeSniffer/File.php",
"CodeSniffer/Report.php",
"CodeSniffer/Reporting.php",
"CodeSniffer/Sniff.php",
"CodeSniffer/Tokens.php",
"CodeSniffer/Reports/",
"CodeSniffer/CommentParser/",
"CodeSniffer/Tokenizers/",
"CodeSniffer/DocGenerators/",
"CodeSniffer/Standards/AbstractPatternSniff.php",
"CodeSniffer/Standards/AbstractScopeSniff.php",
"CodeSniffer/Standards/AbstractVariableSniff.php",
"CodeSniffer/Standards/IncorrectPatternException.php",
"CodeSniffer/Standards/Generic/Sniffs/",
"CodeSniffer/Standards/MySource/Sniffs/",
"CodeSniffer/Standards/PEAR/Sniffs/",
"CodeSniffer/Standards/PSR1/Sniffs/",
"CodeSniffer/Standards/PSR2/Sniffs/",
"CodeSniffer/Standards/Squiz/Sniffs/",
"CodeSniffer/Standards/Zend/Sniffs/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Greg Sherwood",
"role": "lead"
}
],
"description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.",
"homepage": "http://www.squizlabs.com/php-codesniffer",
"keywords": [
"phpcs",
"standards"
],
"time": "2014-12-04 22:32:15"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=5.3.10"
},
"platform-dev": []
}