Coder Social home page Coder Social logo

standards's Introduction

D3R Coding Standards

Include in composer

composer require --dev d3r/standards

PHPCS

"phpcs_additional_args": {
	"--standard": "vendor/d3r/standards/D3R-PHP.xml"
}

or use the stricter standard

	"--standard": "vendor/d3r/standards/D3R-DEV-PHP.xml"
}

PHPCI

php_code_sniffer:
	allowed_warnings: 0
	allowed_errors: 0
	standard: "vendor/d3r/standards/D3R-PHP.xml"

Dev environment

For your editor then we have a more strict standard so we can stage changes without breaking all builds Check these out into your /clients/custom folder.

git clone https://github.com/D3R/standards /clients/custom/standards

then point your editor's phpci to one of the files either /clients/custom/standards/D3R-DEV-PHP.xml or /clients/custom/standards/D3R-PHP.xml

standards's People

Contributors

dave13h avatar dmnc avatar mrjatkin avatar neild3r avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

neild3r fbenas

standards's Issues

Add PHPMD XML

I think we should add in an extra XML for the PHP Mess Detector.

Something like the below

<?xml version="1.0"?>
<ruleset name="D3R Mess Detector Config"
         xmlns="http://pmd.sf.net/ruleset/1.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0
                     http://pmd.sf.net/ruleset_xml_schema.xsd"
         xsi:noNamespaceSchemaLocation="
                     http://pmd.sf.net/ruleset_xml_schema.xsd">
    <description>
        Custom setup for D3R
    </description>

    <rule ref="rulesets/cleancode.xml/BooleanArgumentFlag" />

    <rule ref="rulesets/codesize.xml" />

    <rule ref="rulesets/codesize.xml">
        <exclude name="CamelCaseClassName" />
        <exclude name="CamelCasePropertyName" />
    </rule>

    <rule ref="rulesets/design.xml" />

    <rule ref="rulesets/naming.xml">
        <exclude name="ShortVariable" />
    </rule>

    <rule ref="rulesets/unusedcode.xml" />
</ruleset>

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.