Permalink
Browse files

Update CONTRIBUTING.md

  • Loading branch information...
1 parent e161d6e commit 5594929b5d9d31871cace6d3d7cb940a0010161c @fzaninotto committed Jul 21, 2015
Showing with 1 addition and 1 deletion.
  1. +1 −1 CONTRIBUTING.md
View
@@ -5,7 +5,7 @@ If you've written a new formatter, adapted Faker to a new locale, or fixed a bug
Before proposing a pull request, check the following:
-* Your code should follow the [PSR-2 coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) (and use [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) to fix inconsistencies).
+* Your code should follow the [PSR-2 coding standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). Run `make sniff` to check that the coding standards are followed, and use [php-cs-fixer](https://github.com/fabpot/PHP-CS-Fixer) to fix inconsistencies.
* Unit tests should still pass after your patch. Run the tests on your dev server (with `make test`) or check the continuous integration status for your pull request.
* As much as possible, add unit tests for your code
* Never use `rand()` in your providers. Faker uses the Mersenne Twister Randomizer, so use `mt_rand()` or any of the base generators (`randomNumber`, `randomElement`, etc.) instead.

4 comments on commit 5594929

@vinkla
vinkla commented on 5594929 Jul 21, 2015

@fzaninotto What about adding StyleCI? Then all commits and PRs will be checked automagically.

If you're up to it I can submit a PR.

@fzaninotto
Owner

We already check both style and unit tests in the CI build, see https://github.com/fzaninotto/Faker/blob/5594929b5d9d31871cace6d3d7cb940a0010161c/.travis.yml#L21

@GrahamCampbell
Contributor

@fzaninotto Running cs checks on travis is a bad idea. You surely want to tell if the tests fail separately to if the cs fails, straight away.

@fzaninotto
Owner

I don't understand the "right away". You mean for developers, before they submit a PR? Well, they have a make sniff command, I can't do more. And I do want a CS check for every PR, so instead of asking for a second build, I put it all in the same build. I don't see the problem.

Please sign in to comment.