Code Monkey home page Code Monkey logo

coding-standards's Introduction

Human Made Coding Standards
WordPress coding standards, enhanced for modern development.
Build Status
A Human Made project.

This is a codified version of the Human Made style guide. We include phpcs, ESLint, and stylelint rules.

Contributing

We welcome contributions to these standards and want to make the experience as seamless as possible. To learn more about contributing, please reference the CONTRIBUTING.md file.

Setup

Each ruleset is available individually via Composer or NPM. To install the needed ruleset, use one of the following commands:

  • PHPCS: composer require --dev humanmade/coding-standards
  • ESLint: npx install-peerdeps --dev @humanmade/eslint-config@latest
  • stylelint: npm install --save-dev stylelint @humanmade/stylelint-config

Using PHPCS

Run the following command to run the standards checks:

vendor/bin/phpcs --standard=vendor/humanmade/coding-standards .

We use the DealerDirect phpcodesniffer-composer-installer package to handle installed_paths for PHPCS when first installing the HM ruleset. If you an error such as ERROR: Referenced sniff "WordPress-Core" does not exist, delete the composer.lock file and vendor directories and re-install Composer dependencies.

The final . here specifies the files you want to test; this is typically the current directory (.), but you can also selectively check files or directories by specifying them instead.

You can add this to your Travis YAML file as a test:

script:
  - phpunit
  - vendor/bin/phpcs --standard=vendor/humanmade/coding-standards .

Excluding Files

This standard includes special support for a .phpcsignore file (in the future, this should be built into phpcs itself). Simply place a .phpcsignore file in your root directory (wherever you're going to run phpcs from).

The format of this file is similar to .gitignore and similar files: one pattern per line, comment lines should start with a #, and whitespace-only lines are ignored:

# Exclude our tests directory.
tests/

# Exclude any file ending with ".inc"
*\.inc

Note that the patterns should match the PHP_CodeSniffer style: * is translated to .* for convenience, but all other characters work like a regular expression.

Patterns are relative to the directory that the .phpcsignore file lives in. On load, they are translated to absolute patterns: e.g. */tests/* in /your/dir/.phpcsignore will become /your/dir/.*/tests/.* as a regular expression. This differs from the regular PHP_CodeSniffer practice.

Advanced/Extending

If you want to add further rules (such as WordPress.com VIP-specific rules) or customize PHPCS defaults, you can create your own custom standard file (e.g. phpcs.ruleset.xml):

<?xml version="1.0"?>
<ruleset>
	<!-- Files or directories to check -->
	<file>.</file>

	<!-- Path to strip from the front of file paths inside reports (displays shorter paths) -->
	<arg name="basepath" value="." />

	<!-- Set a minimum PHP version for PHPCompatibility -->
	<config name="testVersion" value="7.2-" />

	<!-- Use HM Coding Standards -->
	<rule ref="vendor/humanmade/coding-standards" />

	<!-- Add VIP-specific rules -->
	<rule ref="WordPress-VIP" />
</ruleset>

You can then reference this file when running phpcs:

vendor/bin/phpcs --standard=phpcs.ruleset.xml .

Excluding/Disabling Checks

You can also customise the rule to exclude elements if they aren't applicable to the project:

<rule ref="vendor/humanmade/coding-standards">
	<!-- Disable short array syntax -->
	<exclude name="HM.Debug.ForceShortArray" />
</rule>

Rules can also be disabled inline. phpcs rules can be disabled with a // @codingStandardsIgnoreLine comment, and ESLint rules can be disabled with a /* eslint disable ... */ comment.

To find out what these codes are, specify -s when running phpcs, and the code will be output as well. You can specify a full code, or a partial one to disable groups of errors.

Included Checks

The phpcs standard is based upon the WordPress-VIP standard from WordPress Coding Standards, with customisation and additions to match our style guide.

Using ESLint

The ESLint package contains an ESLint configuration which you can use to validate your JavaScript code style. While it is possible to run ESLint via phpcs, we recommend you install and use eslint via npm directly or use linter-bot. See the @humanmade/eslint-config package README for more information on configuring ESLint to use the Human Made coding standards.

Once you have installed the @humanmade/eslint-config npm package, you may simply specify that your own project-level ESLint file extends the humanmade configuration. If you install this globally (npm install -g @humanmade/eslint-config) you can also reference the configuration directly from the command line via eslint -c humanmade .

Alternatively, you can create your own configuration and extend these rules:

.eslintrc

{
  "extends": "@humanmade"
}

Using stylelint

The stylelint package contains a stylelint configuration which you can use to validate your CSS and SCSS code style. We recommend you install and use stylelint via npm directly or use linter-bot. See the @humanmade/stylelint package README for more information on configuring stylelint to use the Human Made coding standards.

To integrate the Human Made rules into your project, add a .stylelintrc file and extend these rules. You can also add your own rules and overrides for further customization.

{
  "extends": "@humanmade/stylelint-config",
  "rules": {
    ...
  }
}

coding-standards's People

Contributors

bronsonquick avatar dac514 avatar dependabot[bot] avatar igmoweb avatar joehoyle avatar johnbillion avatar kadamwhite avatar kevinlangleyjr avatar mattheu avatar mikeselander avatar missjwo avatar nathanielks avatar ntwb avatar pdewouters avatar peterwilsoncc avatar rmccue avatar roborourke avatar svandragt avatar tfrommen avatar tomjn avatar

Stargazers

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

Watchers

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

coding-standards's Issues

`HM.Files.NamespaceDirectoryName.NameMismatch` misreporting multiple formats.

Directory names do not account for camel case or underscores in namespaces.

I have the file mu-plugins/pwcc-multi-domain/inc/post-types/namespace.php

  • The namespace PWCC\MultiDomain\PostTypes throws an error requesting the directory name posttypes - report
  • The namespace PWCC\MultiDomain\Post_Types throws an error requesting the directory name post_types - report

Oddly mu-plugins/pwcc-multi-domain/inc/namespace.php does not trigger an error for the namespace PWCC\MultiDomain.

Support [namespace].php too in file naming convention

I think I might have seen this proposal somewhere before, but I can't find it here. Instead of requiring my_namespace/namespace.php where your namespace doesn't have any classes, we should support my_namespace.php so there's a little less folder cruft.

Split standard into core and style

In order to better assess third-party code, we should split out the core (security, performance) rules from the style rules. We should do this for both PHP and JS, but PHP is a larger priority.

HM.Files.ClassFileName.MismatchedName includes interfaces

This sniff currently includes the token for interfaces, and errors, insisting that the file have a class prefix on the file name. I dont think this is correct behaviour a interface filename should be interface-foo.php not class-foo.php

Is this intentional or a bug, if its intentional whats the reasoning behind it.

NoSpaceAfterCloseParenthesis is (currently) inconsistent.

The WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis rule is (currently) inconsistent.

I get:

Space between opening control structure and closing parenthesis is required
(WordPress.WhiteSpace.ControlStructureSpacing.NoSpaceAfterCloseParenthesis)

For:

function test2( array $foo ): \Generator {
    yield 1;
}

But no complaints for the exact same code without a function parameter:

function test1(): \Generator {
    yield 1;
}

It might be fixed upstream?

See: WordPress/WordPress-Coding-Standards#547 (comment)

Invalid configuration for object-curly-newline

We have installed the composer package in a WP plugin, this plugin has a package.json file with a dependency of react-scripts - v2.0.4.
The composer package has a dependency on 0.5.0 of this library.

When running eslint from the root of the plugin, we get the following error:

/Users/daniel-westall/sites/hmn.newsuk/vvv/www/wordpress-default/public_html/wp-content/plugins/nu-sun-web-wp-home-page-customiser-V2/vendor/humanmade/coding-standards/packages/eslint-config-humanmade/index.js:
    Configuration for rule "object-curly-newline" is invalid:
    Value "[object Object]" should be equal to one of the allowed values.
    Value "[object Object]" should NOT have additional properties.
    Value "[object Object]" should match exactly one schema in oneOf.
    Value "[object Object]" should NOT have additional properties.
    Value "[object Object]" should match exactly one schema in oneOf.

This version of react-script uses eslint v5. I couldn't find anything related to this rule specifically in the release notes
I'm guessing either the new version has some backward incompatible change that I haven't found, or there's something broken in the config of the plugin.

Also

[REACT] ./src/components/ItemClipboard.js
[REACT]   Line 1:  Definition for rule 'jsx-a11y/href-no-hash' was not found  jsx-a11y/href-no-hash

This rule seems to be disabled in our coding standards, so that shouldn't be happening

HM.Layout.Order.WrongOrder false positives

HM.Layout.Order.WrongOrder can throw a false positives in files with anonymous functions using use.

This code

<?php
namespace Hamilton;

use Hamilton\Mixtape;

const WRITER = 'Lin-Manuel Miranda';

add_filter( 'Hamilton/Cast', function ( $cast ) use ( $replacements ) {
	return $replacements;
} );

Error thrown:

----------------------------------------------------------------------
FOUND 1 ERROR AFFECTING 1 LINE
----------------------------------------------------------------------
 1 | ERROR | use found on line 8, but const was declared on line 6.
   |       | Statements should be ordered `namespace`, `use`, `const`,
   |       | `require`, then code. (HM.Layout.Order.WrongOrder)
----------------------------------------------------------------------

Add instructions for customising ESLint when using HM Linter

When using the HM Linter, you cannot extend the ESLint configuration by referring to the location of the ruleset on the filesystem.

Indeed it is sufficient to do the following (with sample rule customisation):

{
  "extends": "humanmade",
  "rules": {
    "react/react-in-jsx-scope": "off"
  }
}

As the Linter does not really have a documentation page, we should include these instructions on this repository instead.

Remove PSR2.Namespaces.UseDeclaration.MultipleDeclarations

Can we remove PSR2.Namespaces.UseDeclaration.MultipleDeclarations ("There must be one USE keyword per declaration")?

Modern PHP supports this syntax, and the above rule blocks it:

use some\namespace\{ClassA, ClassB, ClassC as C};
use function some\namespace\{fn_a, fn_b, fn_c};
use const some\namespace\{ConstA, ConstB, ConstC};

Ignore `inc` namespace rule in test directories

The NamespaceDirectoryNameSniff sniff currently requires namespaces within test directory files, but this should not be required as test files are outside of a plugin-based organizational structure.

Should check for /.test and /test directories in path and if found, bypass this rule.

Update wpcs to 0.13.1

"wp-coding-standards/wpcs": "^0.10.0"
https://github.com/humanmade/coding-standards/blob/master/composer.json#L7

Should be 0.13.1:
https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/releases

Why?

Getting a lot of bogus errors when running Travis CI with PHP 7.2 (nightly)

Deprecated: Function create_function() is deprecated in /home/travis/build/[secure]/[secure]/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/PreparedSQLSniff.php 

Warning: count(): Parameter must be an array or an object that implements Countable in /home/travis/build/[secure]/[secure]/vendor/wp-coding-standards/wpcs/WordPress/Sniffs/WP/I18nSniff.php on line 234

...

Stylelint: Consider ignoring `@media` when parsing max-nesting rule

Currently, we have a max-nesting rule that is very strict at only allowing 2 levels of nesting with scss, with the exception of blockless-at-rules. I think it might be beneficial to loosen this just a bit for @media rules by adding "ignoreAtRules": ["media"] to the general rule in Stylelint.

Stylelint currently already ignores @media at the first level in a nesting pattern when parsing for nesting depth, but it does not ignore @media when it resides down the chain. If we make the proposed change, @media levels will not affect the nesting depth evaluation, and we still shouldn't end up with too-specific of selectors.

Thoughts?

cc @peterwilsoncc @sambulance @goldenapples @rmccue @joemcgill @kirstyburgoine

Reorganise readme.md structure

The readme structure could be improved, by regrouping content.

I propose the following:

  1. Intro paragraph
  2. Setup
  3. Contributing (former Testing). Located towards the top to encourage people to contribute.
  4. Using PHPUnit (extend, ignore, how to find out which sniffs fail,...).
  5. Using ESlint (same as above).

I'm unsure about the Included Checks section, because it could be interpreted as providing more background about the sniffs, or be considered a shout out section. We could integrate and extend this content based on what the goal is.

Let's discuss structure first, happy to follow up with a PR once we have settled on an outline.

Stylelint: Consider defining Specific Properties Available

We are currently whitelisting unit(less, actually)s for line-height only in our stylelint config, but I propose that we get more specific with what units are available.

Font Size

Common best practice is to use rem units for font size based off of a single root value. We should enforce rem units, or at a minimum, blacklist px units to prevent them from being used.

ms Units

For timing functions, such as transitions or animations, ms units are far clearer and easy to digest than seconds because they are laid out in longform. While they mean the same thing, 400ms is cleaner than .4s and feels more precise in my opinion. I suggest that we enforce ms units on all timing functions.

Ref https://stylelint.io/user-guide/rules/declaration-property-unit-whitelist/ & https://stylelint.io/user-guide/rules/declaration-property-unit-blacklist/

Thoughts #teamfrontend?

cc @peterwilsoncc @sambulance @goldenapples @rmccue @joemcgill

Fix Travis CI integration

When submitting a pull request, Travis CI fails.

Current error:

0.17s$ cd /tmp/phpcs && composer install
Composer could not find a composer.json file in /tmp/phpcs
To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section
The command "cd /tmp/phpcs && composer install" failed and exited with 1 during .

Exclude page template names from dash naming rules

These need to match the template hierarchy, so the name isn't flexible. We should exempt the following patterns from WordPress.Files.FileName.NotHyphenatedLowercase:

  • category-*.php
  • author-*.php
  • taxonomy-*.php
  • archive-*.php
  • single-*.php
  • page-*.php

Object destructuring and imports fail object-curly-newline rules

The following are currently failing the object-curly-newline rules, and should not be:

import { Route, withRouter } from 'react-router-dom';
const { lastView, onDismiss } = props;

These appear to now have enforced newlines, when they should be optional.

Specify exact version of PHPCS/WPCS

Pretty sick of WPCS changing rules out from underneath us, which is due to specifying ^0.14.0. We should have a specific version instead.

Remove array alignment rule for PHP?

In #41 we removed the object property alignment rule for JS, making this valid code:

const x = {
	foo: "bar",
	longerPropertyName: "value",
};

Should we do the same for PHP? Currently, this code fails:

$x = [
	'foo' => 'bar',
	'longerPropertyName' => 'value',
];

The error is:

Array double arrow not aligned correctly; expected 16 space(s) between "'foo'" and double arrow, but found 1.
(WordPress.Arrays.MultipleStatementAlignment.DoubleArrowNotAligned)

Alignment with equals signs

There's seems to be a new part of WordPress.Arrays.MultipleStatementAlignment.NotSameWarning that makes the following a failure:

$all['read_applications'] = true;
$all['read_application'] = true;

Do we want this / is this intentional? This is pretty dumb I think in most situations and probably leads to be putting lots of daniel spacing everywhere so the lines are not consecutive.

Allow PHP7 function import syntax

The following causes a warning: "There must be one USE keyword per declaration"

use function NewsUK\HomepageCustomiser\{get_layout_id_for_term,get_preview_script_url,get_preview_style_url,is_enabled_for_term};

This syntax is similar to how we write import statements in JS, so would make sense to allow

PHPCS not enforcing space after parenthesis when args span multiple lines

The following code is NOT flagged as an error, but I would expect it to be. Note missing space after the first (.

get_extended_template_part('atoms/heading', '4', [
	'heading_three' => 'This is a heading 3',
] );

However it is correctly enforced if the args are on a single line. e.g.

get_extended_template_part('atoms/heading', '4', [ 'heading_three' => 'This is a heading 3' ] );

Don't require wp_parse_url instead of parse_url?

This is done, because, I quote:

  • A wrapper for PHP's parse_url() function that handles consistency in the return
  • values across PHP versions.
  • PHP 5.4.7 expanded parse_url()'s ability to handle non-absolute url's, including
  • schemeless and relative url's with :// in the path. This function works around
  • those limitations providing a standard output on PHP 5.2~5.4+.
  • Secondly, across various PHP versions, schemeless URLs starting containing a ":"
  • in the query are being handled inconsistently. This function works around those
  • differences as well.
  • Error suppression is used as prior to PHP 5.3.3, an E_WARNING would be generated
  • when URL parsing failed.

As far as I can tell, parse_url() is safe to use if you know your environment is going to be PHP >= 7.0. Does this project have a minimum supported PHP version? If it does, and it matches this constraint, can we please consider adding a rule exclude for WordPress.WP.AlternativeFunctions.parse_url_parse_url thank you

Stylelint Moving Forward

We've had a Stylelint config sitting in this repo for almost a year now, and it would be be most useful to our project to release this and get it into practice on projects. This is a rough plan of steps involved with getting Stylelint moved forward and into use on our projects.

As with everything, would love perspectives and to know if I've missed a step here.

  • Complete carry-on rule adjustments (#103, #106) cc @peterwilsoncc
  • Add Lerna to repo
  • Push Stylelint to npm as a standalone package, tagged 0.6
  • Release 0.6 of full coding standards (we should focus on closing out open, completed PRs first)
  • Include Stylint and any other carry-on changes as a 0.7 follow up to 0.6
  • Write internal Dev post explaining Stylelint (what it is, how it works, how we'll release it)
  • Add Stylelint to HM Linter (ref: humanmade/linter-bot#80)

Add jsx-no-bind rule to config

For React rendering performance we should consider adding jsx-no-bind to this eslint config; bound functions and arrow functions created within a render method's JSX will never be treated as equivalent when React is comparing subcomponent properties and can lead to a lot of unnecessary (and therefore expensive) re-renders.

Alter space-unary-ops to account for nonwords

Currently we have:

space-unary-ops:
  - error
  - words: true
    nonwords: true
    overrides:
      ++: false
      --: false

and we should have:

space-unary-ops:
  - error
  - words: true
    nonwords: false

Odd max-columns with using phpcbf

I think I saw some mention of a columns length change somewhere, but when I run phpcbf it's doing odd indenting / line returns, such as:

add_filter( 'determine_current_user', function ( $user ) {
	return 1;
} );

=>

add_filter(
	'determine_current_user', function ( $user ) {
		return 1;
	}
);

Like, what even is that?!

Unexpected console statement.

It seems console.error causes a eslint warning. Is this intentional? Is doing console.error / console.warn not a valid thing to do in production code?

PHPUnit failing on master branch

There are currently errors on the master branch when running PHPUnit. This blocks the merge of any new PR's, as the merge button is flagged to only accept passing Travis runs. I'm opening this issue to track resolving these failures.

Click to expand PHPUnit error output
PHPUnit 5.7.27 by Sebastian Bergmann and contributors.

.......FFF. 11 / 11 (100%)

Time: 140 ms, Memory: 12.00MB

There were 3 failures:

  1. HM\CodingStandards\Tests\FixtureTests::test_passing_files with data set #1 ('/hm/gh/coding-standards/tests...er.php')
    File /fixtures/pass/use-order.php should not contain any errors
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
  • 11 => Array (...)
  • 15 => Array (...)
  • 19 => Array (...)
  • 23 => Array (...)
  • 27 => Array (...)
  • 31 => Array (...)
  • 35 => Array (...)
  • 39 => Array (...)
  • 43 => Array (...)
    )

/hm/gh/coding-standards/tests/FixtureTests.php:69

  1. HM\CodingStandards\Tests\FixtureTests::test_passing_files with data set #2 ('/hm/gh/coding-standards/tests...ce.php')
    File /fixtures/pass/inc/namespace.php should not contain any errors
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
  • 11 => Array (...)
  • 13 => Array (...)
  • 14 => Array (...)
  • 15 => Array (...)
  • 16 => Array (...)
  • 18 => Array (...)
  • 19 => Array (...)
  • 21 => Array (...)
  • 28 => Array (...)
  • 30 => Array (...)
  • 31 => Array (...)
  • 32 => Array (...)
  • 33 => Array (...)
    )

/hm/gh/coding-standards/tests/FixtureTests.php:69

  1. HM\CodingStandards\Tests\FixtureTests::test_failing_files with data set #0 ('/hm/gh/coding-standards/tests...er.php')
    Failed asserting that two arrays are equal.
    --- Expected
    +++ Actual
    @@ @@
    Array (
    1 => Array (...)
  • 10 => Array (...)
  • 16 => Array (...)
    )

/hm/gh/coding-standards/tests/FixtureTests.php:118

FAILURES!
Tests: 11, Assertions: 8, Failures: 3.

Tested on Travis in #72 and locally with PHP 7.2.7

Update PHPCS to 3.3

PHPCS 3.3 fixes an issue whereby the end of comment blocks was mis-identifed if a phpcs:disable/enable rule was included in the block. This is causing false issues in a client repo (ask me for more details if necessary). We should upgrade if there are not other various issues that arise form the upgrade.

See squizlabs/PHP_CodeSniffer#1918 for more details on the specific issue that I'me seeing.

Add tests to stylelint rules

We currently have no tests for the stylelint rules and we should add them to make sure that we're running the rules correctly and have greater confidence in changes.

I don't want to hold up #45 just for this, but we should add the tests in a subsequent PR.

enforce JS import ordering

In #75 @igmoweb proposed the addition of the sort-imports ESLint rule, to control the ordering of modules we import into our code.

In a Slack thread @rmccue further proposed that we conform to a general ordering of absolute, then relative, then side effects (e.g. importing a CSS file to ensure it gets included in the build, but not using the return of that import), with a blank line between each, and each section alphabetized.

As an example:

import React from 'react';
import { connect } from 'react-redux';

import Foo from './Foo';

import './Bar.css';

This made sense to me, and would help a lot on several projects we've had lately.

The sort-imports rule looks like it can handle putting the import-for-side-effects after other imports, but doesn't at first glance support including the relative imports after absolute. We should investigate further.

Can't get it to work installed globally

I have WordPress-VIP installed globally, and PHPCS can find it just fine:

$ phpcs -i
The installed coding standards are MySource, PEAR, PHPCS, PSR1, PSR2, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs, WordPress-Extra and WordPress-VIP

If I then install this repo globally, e.g.

$ composer global require humanmade/coding-standards
[snipped]
$ phpcs --config-set installed_paths /Users/leewillis/.composer/vendor/wp-coding-standards/wpcs/,/Users/leewillis/.composer/vendor/humanmade/coding-standards/
Config value "installed_paths" added successfully

HM shows up as an available standard:

$ phpcs -i
The installed coding standards are MySource, PEAR, PHPCS, PSR1, PSR2, Squiz, Zend, WordPress, WordPress-Core, WordPress-Docs, WordPress-Extra, WordPress-VIP and HM

However - it's unusable:

$ phpcs --standard=HM foo.php 

Fatal error: Uncaught PHP_CodeSniffer_Exception: Referenced sniff "WordPress-VIP" does not exist in /Users/leewillis/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php:1167
Stack trace:
#0 /Users/leewillis/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php(780): PHP_CodeSniffer->_expandRulesetReference(Object(SimpleXMLElement), '/Users/leewilli...', 0)
#1 /Users/leewillis/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php(578): PHP_CodeSniffer->processRuleset('/Users/leewilli...')
#2 /Users/leewillis/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php(956): PHP_CodeSniffer->initStandard(Array, Array, Array)
#3 /Users/leewillis/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer/CLI.php(113): PHP_CodeSniffer_CLI->process()
#4 /Users/leewillis/.composer/vendor/squizlabs/php_codesniffer/scripts/phpcs(25): PHP_CodeSniffer_CLI->runphpcs()
#5 {main}
  thrown in /Users/leewillis/.composer/vendor/squizlabs/php_codesniffer/CodeSniffer.php on line 1167

I think because of the clobbering of install paths done in HM/ruleset.xml, but not sure what the fix would be.

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.