mirror of
https://github.com/pi-hole/web.git
synced 2024-12-06 19:36:21 +01:00
@@ -0,0 +1,13 @@
|
|||||||
|
# .github/workflows/php-cs-fixer.yml
|
||||||
|
on: [push, pull_request]
|
||||||
|
name: Lint
|
||||||
|
jobs:
|
||||||
|
php-cs-fixer:
|
||||||
|
name: PHP-CS-Fixer
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: PHP-CS-Fixer
|
||||||
|
uses: docker://oskarstark/php-cs-fixer-ga
|
||||||
|
with:
|
||||||
|
args: --diff --dry-run
|
||||||
@@ -7,6 +7,7 @@ TODO
|
|||||||
*.zip
|
*.zip
|
||||||
test.html
|
test.html
|
||||||
*.log
|
*.log
|
||||||
|
.php-cs-fixer.cache
|
||||||
|
|
||||||
# Intellij IDEA Project Files
|
# Intellij IDEA Project Files
|
||||||
*.iml
|
*.iml
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
/* Pi-hole: A black hole for Internet advertisements
|
||||||
|
* (c) 2022 Pi-hole, LLC (https://pi-hole.net)
|
||||||
|
* Network-wide ad blocking via your own hardware.
|
||||||
|
*
|
||||||
|
* This file is copyright under the latest version of the EUPL.
|
||||||
|
* Please see LICENSE file for your rights under this license.
|
||||||
|
*/
|
||||||
|
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
$finder = PhpCsFixer\Finder::create()
|
||||||
|
->ignoreDotFiles(false)
|
||||||
|
->ignoreVCSIgnored(true)
|
||||||
|
->exclude('scripts/vendor')
|
||||||
|
->in(__DIR__)
|
||||||
|
;
|
||||||
|
|
||||||
|
$config = new PhpCsFixer\Config();
|
||||||
|
$config
|
||||||
|
->setRules(array(
|
||||||
|
'@PhpCsFixer' => true,
|
||||||
|
'array_syntax' => array('syntax' => 'long'),
|
||||||
|
))
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
||||||
|
|
||||||
|
return $config;
|
||||||
Reference in New Issue
Block a user