-
Notifications
You must be signed in to change notification settings - Fork 23
chore: Add rector and cs-fix #1103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a673a96
chore: Add rector and cs-fix
CarlSchwan 7b15080
chore: Bump minimal supported version to NC30
CarlSchwan bd4cbd4
refactor(config): Port to IAppConfig
CarlSchwan e9b8e65
fix(psalm): Fix psalm issues
CarlSchwan c8312ea
refactor(Checker): Improve typing of isIp methods
CarlSchwan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: lint-php-cs-${{ github.head_ref || github.run_id }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| name: php-cs | ||
|
|
||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Get php version | ||
| id: versions | ||
| uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1 | ||
|
|
||
| - name: Set up php${{ steps.versions.outputs.php-min }} | ||
| uses: shivammathur/setup-php@0f7f1d08e3e32076e51cae65eb0b0c871405b16e # v2.34.1 | ||
| with: | ||
| php-version: ${{ steps.versions.outputs.php-min }} | ||
| extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite | ||
| coverage: none | ||
| ini-file: development | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| - name: Install dependencies | ||
| run: | | ||
| composer remove nextcloud/ocp --dev --no-scripts | ||
| composer i | ||
|
|
||
| - name: Lint | ||
| run: composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 ) |
This file contains hidden or 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,22 @@ | ||
| <?php | ||
|
|
||
| declare(strict_types=1); | ||
| /** | ||
| * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors | ||
| * SPDX-License-Identifier: AGPL-3.0-or-later | ||
| */ | ||
| require_once './vendor-bin/cs-fixer/vendor/autoload.php'; | ||
|
|
||
| use Nextcloud\CodingStandard\Config; | ||
|
|
||
| $config = new Config(); | ||
| $config | ||
| ->getFinder() | ||
| ->ignoreVCSIgnored(true) | ||
| ->notPath('build') | ||
| ->notPath('tests/stubs') | ||
| ->notPath('l10n') | ||
| ->notPath('src') | ||
| ->notPath('vendor') | ||
| ->in(__DIR__); | ||
| return $config; | ||
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.