Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Jul 5, 2019
1 parent 09a859e commit 24e41f4
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 26 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"require": {
"php": ">=7.2",
"psr/log": "^1.1",
"simplepie/utility-pack": "dev-master",
"simplepie/utility-pack": "^2.2",
"symfony/finder": "^4.2"
},
"require-dev": {
Expand Down
28 changes: 7 additions & 21 deletions static/_scrutinizer.yml.tmpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# language: php
build:
nodes:
analysis:
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true
analysis:
tests:
override:
- php-scrutinizer-run
-
command: phpcs-run
use_website_config: true

before_commands:
- "composer install --no-dev --prefer-source"
Expand Down Expand Up @@ -168,20 +168,6 @@ tools:
php_sim: false
php_code_coverage:
enabled: true
php_code_sniffer:
enabled: true
config:
standard: PSR2
filter:
paths: ["src/*", "tests/*"]
php_cs_fixer:
enabled: true
config:
level: all
filter:
paths:
- 'src/*'
- 'tests/*'
php_cpd:
enabled: true
excluded_dirs:
Expand Down
12 changes: 9 additions & 3 deletions templates/README-CODING_STANDARDS.tmpl
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
PSR-1/2/5/12/19 are a solid foundation, but are not an entire coding style by themselves. By leveraging tools such as [PHP CS Fixer](http://cs.sensiolabs.org) and [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer), we can automate a large part of our style requirements.
PSR-1/2/5/12/19 are a solid foundation, but are not an entire coding style by themselves. We automate a large part of our style requirements using [PHP CS Fixer](http://cs.sensiolabs.org) and [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer). (The things that we cannot yet automate are documented here: <https://github.com/simplepie/simplepie-ng-coding-standards>.)

These can be applied automatically by running the linter:
These can be applied/fixed automatically by running the linter:

```bash
make lint
```

The things that we cannot yet automate are documented here: <https://github.com/simplepie/simplepie-ng-coding-standards>
Additionally, in our quest to write excellent code, we use a variety of tools to help us catch issues with what we've written, including:

| Type | Description |
| ---- | ----------- |
| Linting Tools | [PHP CS Fixer](http://cs.sensiolabs.org), [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) |
| QA Tools | [PDepend](https://github.com/pdepend/pdepend), [PHPLOC](https://github.com/sebastianbergmann/phploc), [PHP Copy/Paste Detector](https://github.com/sebastianbergmann/phpcpd), [PHP Code Analyzer](https://github.com/wapmorgan/PhpCodeAnalyzer) |
| Static Analysis | [Phan](https://github.com/phan/phan), [PHPStan](https://github.com/phpstan/phpstan), [Psalm](https://github.com/vimeo/psalm), [PHP Dependency Analysis](https://github.com/mamuz/PhpDependencyAnalysis) |
2 changes: 1 addition & 1 deletion templates/composer.json.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"require": {
"php": ">=7.2",
"psr/log": "^1.1",
"simplepie/utility-pack": "dev-master"
"simplepie/utility-pack": "^2.2"
},
"require-dev": {
"bramus/monolog-colored-line-formatter": "^3.0",
Expand Down

0 comments on commit 24e41f4

Please sign in to comment.