Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
* SPDX-License-Identifier: AGPL-3.0-or-later
*/

require_once __DIR__.'/vendor-bin/coding-standard/vendor/autoload.php';
require_once __DIR__ . '/vendor-bin/coding-standard/vendor/autoload.php';

use Nextcloud\CodingStandard\Config;

Expand Down
25 changes: 25 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
# SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: check-yaml
- id: check-added-large-files
- repo: https://github.com/nextcloud/pre-commit-php.git
rev: 1.5.1
hooks:
- id: php-lint
- id: php-cs-fixer
files: \.(php)$
exclude: ^(vendor|vendor-bin)
args: []
- repo: local
hooks:
- id: check-dirty-version
name: Check updater.phar for dirty version
entry: tests/checkPharForDirtyVersion.sh
language: script
files: ^updater.phar$
6 changes: 6 additions & 0 deletions tests/checkPharForDirtyVersion.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
#
# SPDX-FileCopyrightText: 2026 Nextcloud GmbH and Nextcloud contributors
# SPDX-License-Identifier: AGPL-3.0-or-later

grep --text "class Version {" -A3 updater.phar | grep -v dirty
Loading