Skip to content
This repository was archived by the owner on Jan 21, 2020. It is now read-only.

Add license sniff and fixes #2

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
7caa54e
Add license sniff and fixes
geerteltink Apr 12, 2017
841e6bf
Add sniff + fix for invalid date in COPYING.md and LICENSE.md
geerteltink Apr 12, 2017
297d314
Update Travis-CI config
geerteltink Apr 12, 2017
e63eef6
Add missing composer scripts
geerteltink Apr 12, 2017
eab40db
Improve consistency, formatting and docblocks
geerteltink Apr 12, 2017
a2159ca
Use standard phpunit assertions for backwards compatibility
geerteltink Apr 12, 2017
7575bca
Add missing travis-ci global env's
geerteltink Apr 12, 2017
40d8951
Fix location of ZendCodingStandard ruleset
geerteltink Apr 12, 2017
189a37b
Fix code coverage whitelist
geerteltink Apr 13, 2017
7b5e155
Enable coveralls
geerteltink Apr 13, 2017
d993b37
Enforce checking and updating license and copying file
geerteltink Apr 13, 2017
82d08bf
Detect and replace deprecated link tag with see tag
geerteltink Apr 14, 2017
8f30be0
Globally exclude TestAssets
geerteltink Apr 14, 2017
dc8b879
Add more tests and a fix for SpacingAfterComment
geerteltink Apr 14, 2017
4f309af
Enable excluding TestAsset paths again :$
geerteltink Apr 14, 2017
49c98f6
Bring readme inline with other components
geerteltink Apr 14, 2017
71f10ac
Update to PHP_CodeSniffer 3.x
geerteltink May 17, 2017
5a67fd3
Truncate copyright text
geerteltink May 17, 2017
441ee8a
s/COPYING/COPYRIGHT/
geerteltink May 17, 2017
fbd5073
Remove the dummy ruleset and use only the real ruleset
geerteltink May 17, 2017
a075478
Update the TestCase for PHP_CodeSniffer 3
geerteltink May 18, 2017
97b0420
Run coverage on PHP 7.1
geerteltink May 18, 2017
542d86b
Use proper namespace for tests
geerteltink May 18, 2017
2a8be4c
Use only 1 autoloader when running tests
geerteltink May 18, 2017
e8e2d85
Disable test coverage
geerteltink May 18, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .coveralls.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
coverage_clover: clover.xml
json_path: coveralls-upload.json
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/clover.xml
/composer.lock
/coveralls-upload.json
/phpunit.xml
/vendor/
77 changes: 77 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
sudo: false

language: php

cache:
directories:
- $HOME/.composer/cache
- vendor

env:
global:
- COMPOSER_ARGS="--no-interaction"
- COVERAGE_DEPS="satooshi/php-coveralls"
- LEGACY_DEPS="phpunit/phpunit"

matrix:
include:
- php: 5.6
env:
- DEPS=lowest
- php: 5.6
env:
- DEPS=locked
- php: 5.6
env:
- DEPS=latest
- php: 7
env:
- DEPS=lowest
- php: 7
env:
- DEPS=locked
- php: 7
env:
- DEPS=latest
- php: 7.1
env:
- DEPS=lowest
- php: 7.1
env:
- DEPS=locked
- php: 7.1
env:
- DEPS=latest
#- TEST_COVERAGE=true

before_install:
- if [[ $TEST_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini || return 0 ; fi
- travis_retry composer self-update

install:
- travis_retry composer install $COMPOSER_ARGS --ignore-platform-reqs
- if [[ $TRAVIS_PHP_VERSION =~ ^5.6 ]]; then travis_retry composer update $COMPOSER_ARGS --with-dependencies $LEGACY_DEPS ; fi
- if [[ $DEPS == 'latest' ]]; then travis_retry composer update $COMPOSER_ARGS ; fi
- if [[ $DEPS == 'lowest' ]]; then travis_retry composer update --prefer-lowest --prefer-stable $COMPOSER_ARGS ; fi
- if [[ $TEST_COVERAGE == 'true' ]]; then travis_retry composer require --dev $COMPOSER_ARGS $COVERAGE_DEPS ; fi
- composer show

script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer test-coverage ; else composer test ; fi
- composer cs-check

after_script:
- if [[ $TEST_COVERAGE == 'true' ]]; then composer upload-coverage ; fi

notifications:
email: false
irc:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line on down can be removed now. 🙌

channels:
- "irc.freenode.org#zftalk.dev"
on_success: change
on_failure: always
slack:
rooms:
- secure: "fh+J7c7A9f7Sje2h9M00mw9UyeKQ2l1FyGvOwQ50CPHvf0u7bb1OV3sEqTukiwSNEQNmJ5C3QuJpaxkIeDjI8LJpeNderWeu6NH2O5OedSEElHmc7RsBygfiHM05hWnv10ddDxJ+YtmuNjpkXIoXcBdHby+eRBJ09YStVhnIwQakBbKBH7Idlitn23QYl4VZeA3jTcGsHhCtGjpjDt4sohs/RJWgGfAYTSKcjSLdFWWdg2G8PRPKTyQkR+nFd92lvVeRteg0VzxGJqKXoeJP3B0WYB7emQJho+ly4DZFkL+wJZPtcEHCi/ne9l/OaVy6XGhbiDVXxxpyexD4cmGySdjpsYirXqxjS6V8kfWn3JVbCxipI518zJq5Rb3JOCVcdoo7P/xXqYj+fihMbGfxBorUqwm8uBlCblRGXJ1QcVRsi52u0zMJN+QQ/gYHf0gBoF9IbYvQDeshZT80TnYUy2/om/j9xTUfZMdEKTRQWrj9LbsNKY619gZt2u/b2tbcWdjFiPA/Uxa2VjphHz8LFuHaU43/km4swLhthkPowdZLozuyJjksbJcjH7izh3Hxd8oRxBFrqdfuPgh3owQyW75wvG/TGWnNXMqO66OuXXaJKAomBnVBjGB6DBo3TnPzEyKUkLi54AVQIfaDPqQH8yec5ugogOYrrQDLIT1kdVY="
on_success: change
on_failure: always
1 change: 1 addition & 0 deletions COPYRIGHT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Copyright (c) 2016-2017, Zend Technologies USA, Inc.
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2016, Zend Technologies USA, Inc.
Copyright (c) 2016-2017, Zend Technologies USA, Inc.

All rights reserved.

Expand Down
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
Zend Framework Coding Standard
==============================
# Zend Framework Coding Standard

Repository with all coding standard ruleset for Zend Framework repositories.
[![Build Status](https://secure.travis-ci.org/zendframework/zend-coding-standard.svg?branch=master)](https://secure.travis-ci.org/zendframework/zend-coding-standard)
[![Coverage Status](https://coveralls.io/repos/zendframework/zend-coding-standard/badge.svg?branch=master)](https://coveralls.io/r/zendframework/zend-coding-standard?branch=master)

Repository with all coding standard ruleset for Zend Framework repositories.

Installation
------------
## Installation

1. Install the module via composer by running:

Expand Down Expand Up @@ -39,9 +39,7 @@ Installation
You can add or exclude some locations in that file.
For a reference please see: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-ruleset.xml


Usage
-----
## Usage

* To run checks only:

Expand Down
28 changes: 27 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,32 @@
"coding standard"
],
"require": {
"squizlabs/php_codesniffer": "^2.7"
"php": "^5.6 || ^7.0",
"squizlabs/php_codesniffer": "^3.0"
},
"require-dev": {
"mikey179/vfsStream": "^1.6",
"phpunit/phpunit": "^6.1 || ^5.7.15"
},
"autoload": {
"psr-4": {
"ZendCodingStandard\\": "src/ZendCodingStandard/"
}
},
"autoload-dev": {
"psr-4": {
"ZendCodingStandardTest\\": "test/"
}
},
"scripts": {
"check": [
"@cs-check",
"@test"
],
"cs-check": "phpcs -s",
"cs-fix": "phpcbf",
"test": "phpunit --colors=always",
"test-coverage": "phpunit --coverage-clover clover.xml",
"upload-coverage": "coveralls -v"
}
}
17 changes: 17 additions & 0 deletions phpcs.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0"?>
<ruleset name="Zend Framework Coding Standard">
<!-- Load ruleset -->
<rule ref="./src/ZendCodingStandard/ruleset.xml"/>

<arg value="ps"/>

<!-- Check copyright and license files -->
<file>./COPYRIGHT.md</file>
<file>./LICENSE.md</file>
<!-- Paths to check -->
<file>./src</file>
<file>./test</file>

<!-- Exclude test assets -->
<exclude-pattern>*/TestAsset/*</exclude-pattern>
</ruleset>
17 changes: 17 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/squizlabs/php_codesniffer/autoload.php"
colors="true">
<testsuites>
<testsuite name="Zend\\CodingStandard\\Tests">
<directory>test/</directory>
</testsuite>
</testsuites>

<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
</phpunit>
23 changes: 0 additions & 23 deletions ruleset.xml

This file was deleted.

Loading