-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jean-Yves <[email protected]>
- Loading branch information
Showing
5 changed files
with
218 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# This workflow is provided via the organization template repository | ||
# | ||
# https://github.com/nextcloud/.github | ||
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization | ||
# | ||
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors | ||
# SPDX-License-Identifier: MIT | ||
|
||
name: Lint php-cs | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'php/**' | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'php/**' | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: lint-php-cs-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php-versions: [ "8.3" ] | ||
|
||
name: php-cs | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | ||
|
||
- name: Set up php ${{ matrix.php-versions }} | ||
uses: shivammathur/setup-php@a4e22b60bbb9c1021113f2860347b0759f66fe5d # v2 | ||
with: | ||
php-version: ${{ matrix.php-versions }} | ||
coverage: none | ||
ini-file: development | ||
|
||
- name: Install dependencies | ||
run: cd php && composer i | ||
|
||
- name: Lint | ||
run: cd php && composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
require_once './vendor/autoload.php'; | ||
|
||
use Nextcloud\CodingStandard\Config; | ||
|
||
$config = new Config(); | ||
$config | ||
->getFinder() | ||
->ignoreVCSIgnored(true) | ||
->notPath('data') | ||
->notPath('session') | ||
->notPath('public') | ||
->notPath('vendor') | ||
->in(__DIR__); | ||
return $config; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.