Skip to content
Snippets Groups Projects
Commit 4d46e540 authored by Grzegorz Rola's avatar Grzegorz Rola
Browse files

Init

parent b00c8dfe
No related branches found
No related tags found
1 merge request!1Init
Pipeline #2115 passed
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org
# WordPress Coding Standards
# https://make.wordpress.org/core/handbook/coding-standards/
root = true
[*]
indent_style = space
indent_size = 4
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.yml]
indent_style = space
indent_size = 2
[*.md]
trim_trailing_whitespace = false
.git/ export-ignore
tests/ export-ignore
vendor/ export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.gitlab-ci.yml export-ignore
.idea export-ignore
apigen.neon export-ignore
phpcs.xml.dist export-ignore
phpunit-integration.xml export-ignore
phpunit-unit.xml export-ignore
/vendor/
.idea
composer.lock
variables:
DISABLE_PHP_5_5: 1
DISABLE_INTEGRATION_TESTS: 1
DISABLE_CODECEPTION: 1
IS_LIBRARY: 1
include: 'https://gitlab.com/wpdesk/gitlab-ci/raw/master/gitlab-ci-1.2.yml'
[1.0.0] - 2019-05-30
# Added
* First version
MIT License
Copyright (c) 2018 WP Desk
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# wp-code-sniffer
[![pipeline status](https://gitlab.com/wpdesk/wp-code-sniffer/badges/master/pipeline.svg)](https://gitlab.com/wpdesk/wp-code-sniffer/pipelines)
[![coverage report](https://gitlab.com/wpdesk/wp-code-sniffer/badges/master/coverage.svg?job=integration+test+lastest+coverage)](https://gitlab.com/wpdesk/wp-code-sniffer/commits/master)
[![Latest Stable Version](https://poser.pugx.org/wpdesk/wp-code-sniffer/v/stable)](https://packagist.org/packages/wpdesk/wp-code-sniffer)
[![Total Downloads](https://poser.pugx.org/wpdesk/wp-code-sniffer/downloads)](https://packagist.org/packages/wpdesk/wp-code-sniffer)
[![Latest Unstable Version](https://poser.pugx.org/wpdesk/wp-code-sniffer/v/unstable)](https://packagist.org/packages/wpdesk/wp-code-sniffer)
[![License](https://poser.pugx.org/wpdesk/wp-code-sniffer/license)](https://packagist.org/packages/wpdesk/wp-code-sniffer)
Library for Wp Desk Coding Standards in plugins.
===============================================
# Installation
`composer require --dev wpdesk/wp-code-sniffer`
destination: docs
templateConfig: /app/theme-woocommerce/config.neon
extensions: [php]
source:
- src
exclude:
- vendor
- tests
- languages
charset: [UTF-8]
main: Wordpress plugin
title: Plugin template more info
baseUrl: "/"
templateTheme: default
php: false
sourceCode: false
tree: true
deprecated: false
todo: false
download: false
accessLevels:
- public
- private
- protected
{
"name": "wpdesk/wp-code-sniffer",
"description": "Library for WP Desk Coding standards in plugins.",
"license": "MIT",
"keywords": ["wordpress", "code sniffer", "admin"],
"homepage": "https://gitlab.com/wpdesk/wp-code-sniffer",
"type": "library",
"minimum-stability": "stable",
"authors": [
{
"name": "grola",
"email": "grola@wpdesk.net"
}
],
"require": {
"dealerdirect/phpcodesniffer-composer-installer": "^0.6.2",
"phpcompatibility/php-compatibility": "^9.3",
"squizlabs/php_codesniffer": "^3.5",
"wp-coding-standards/wpcs": "^2.2"
},
"require-dev": {
"phpunit/phpunit": "<7",
"mockery/mockery": "*",
"10up/wp_mock": "*"
},
"autoload": {
},
"autoload-dev": {
},
"scripts": {
"phpcs": "phpcs"
},
"extra": {
"class": "WPDesk\\Composer\\Codeception\\Plugin"
}
}
<?xml version="1.0"?>
<ruleset name="WordPress Coding Standards for WP Desk Plugin">
<description>Sniffs for WordPress WPDesk plugins</description>
<config name="testVersion" value="5.6-"/>
<arg name="extensions" value="php"/>
<rule ref="PHPCompatibility"/>
<rule ref="WordPress"/>
<!-- Remove checking if classes are in class- files -->
<rule ref="WordPress.Files.FileName">
<exclude-pattern>/class/.*\.php</exclude-pattern>
</rule>
<rule ref="WordPress.Files.FileName.InvalidClassFileName">
<exclude-pattern>/class/.*\.php</exclude-pattern>
</rule>
<rule ref="WordPress.NamingConventions.ValidVariableName">
<exclude-pattern>/class/.*\.php</exclude-pattern>
</rule>
<rule ref="Generic.Commenting.DocComment.MissingShort">
<exclude-pattern>\.php</exclude-pattern>
</rule>
</ruleset>
<phpunit bootstrap="tests/integration/bootstrap.php"
backupGlobals="false"
>
<testsuites>
<testsuite>
<directory prefix="Test" suffix=".php">./tests/integration</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
<exclude>
<file>src/init.php</file>
<directory>src/assets</directory>
<directory suffix=".php">tests</directory>
<directory suffix=".php">vendor</directory>
</exclude>
</whitelist>
</filter>
<logging>
<log type="junit" target="build-coverage/report.junit.xml"/>
<log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build-coverage/coverage.txt"/>
<log type="coverage-clover" target="build-coverage/clover.xml"/>
</logging>
<php>
<env name="WP_DEVELOP_DIR" value="/tmp/wordpress-develop"/>
<env name="WC_DEVELOP_DIR" value="/tmp/woocommerce"/>
</php>
</phpunit>
<phpunit bootstrap="tests/unit/bootstrap.php">
<testsuites>
<testsuite>
<directory prefix="test-" suffix=".php">./tests/unit/</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<logging>
<log type="junit" target="build-coverage/report.junit.xml"/>
<log type="coverage-html" target="build-coverage/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build-coverage/coverage.txt"/>
<log type="coverage-clover" target="build-coverage/clover.xml"/>
</logging>
</phpunit>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment