mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-08 16:08:41 +00:00
Added action to check style
This commit is contained in:
parent
b8f82be3dc
commit
4488004d72
12
.github/workflows/lint.yml
vendored
Normal file
12
.github/workflows/lint.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
on: [push, pull_request]
|
||||
name: Main
|
||||
jobs:
|
||||
php-cs-fixer:
|
||||
name: PHP-CS-Fixer
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: PHP-CS-Fixer
|
||||
uses: docker://oskarstark/php-cs-fixer-ga
|
||||
with:
|
||||
args: --config=./web/.php_cs --diff --dry-run
|
2
web/.gitignore
vendored
Normal file
2
web/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
||||
.idea
|
||||
.php_cs.cache
|
17
web/.php_cs
Normal file
17
web/.php_cs
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
$finder = PhpCsFixer\Finder::create()
|
||||
->exclude('vendor')
|
||||
->in(__DIR__)
|
||||
;
|
||||
|
||||
return PhpCsFixer\Config::create()
|
||||
->setIndent("\t")
|
||||
->setRules([
|
||||
'braces'=>[
|
||||
'position_after_functions_and_oop_constructs'=>'same'
|
||||
],
|
||||
'elseif' => true
|
||||
])
|
||||
->setFinder($finder)
|
||||
;
|
BIN
web/app/vendor/bin/php-cs-fixer
vendored
Executable file
BIN
web/app/vendor/bin/php-cs-fixer
vendored
Executable file
Binary file not shown.
Loading…
Reference in New Issue
Block a user