Skip to content

Commit 832a16b

Browse files
Update Psalm configuration and add linting workflows for style and REUSE compliance
1 parent 85a086f commit 832a16b

File tree

6 files changed

+82
-4
lines changed

6 files changed

+82
-4
lines changed

.github/workflows/lint-eslint.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
#
6+
# SPDX-FileCopyrightText: 2021-2024 Nextcloud GmbH and Nextcloud contributors
7+
# SPDX-License-Identifier: MIT
8+
9+
name: Lint stylelint
10+
11+
on: pull_request
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: lint-stylelint-${{ github.head_ref || github.run_id }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
lint:
22+
runs-on: ubuntu-latest
23+
24+
name: stylelint
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
29+
with:
30+
persist-credentials: false
31+
32+
- name: Read package.json node and npm engines version
33+
uses: skjnldsv/read-package-engines-version-actions@06d6baf7d8f41934ab630e97d9e6c0bc9c9ac5e4 # v3
34+
id: versions
35+
with:
36+
fallbackNode: '^20'
37+
fallbackNpm: '^10'
38+
39+
- name: Set up node ${{ steps.versions.outputs.nodeVersion }}
40+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
41+
with:
42+
node-version: ${{ steps.versions.outputs.nodeVersion }}
43+
44+
- name: Set up npm ${{ steps.versions.outputs.npmVersion }}
45+
run: npm i -g 'npm@${{ steps.versions.outputs.npmVersion }}'
46+
47+
- name: Install dependencies
48+
env:
49+
CYPRESS_INSTALL_BINARY: 0
50+
run: npm ci
51+
52+
- name: Lint
53+
run: npm run stylelint

.github/workflows/psalm-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: icewind1991/nextcloud-version-matrix@58becf3b4bb6dc6cef677b15e2fd8e7d48c0908f # v1.3.1
2727

2828
- name: Check enforcement of minimum PHP version ${{ steps.versions.outputs.php-min }} in psalm.xml
29-
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}' psalm.xml
29+
run: grep 'phpVersion="${{ steps.versions.outputs.php-min }}"' psalm.xml
3030

3131
static-analysis:
3232
runs-on: ubuntu-latest

.github/workflows/reuse.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# This workflow is provided via the organization template repository
2+
#
3+
# https://github.com/nextcloud/.github
4+
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
5+
6+
# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. <https://fsfe.org>
7+
#
8+
# SPDX-License-Identifier: CC0-1.0
9+
10+
name: REUSE Compliance Check
11+
12+
on: [pull_request]
13+
14+
jobs:
15+
reuse-compliance-check:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
20+
with:
21+
persist-credentials: false
22+
23+
- name: REUSE Compliance Check
24+
uses: fsfe/reuse-action@bb774aa972c2a89ff34781233d275075cbddf542 # v5.0.0

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"lint": "find . -name \\*.php -not -path './vendor/*' -print0 | xargs -0 -n1 php -l",
3333
"cs:check": "./vendor/bin/php-cs-fixer fix --dry-run --diff --config=.php-cs-fixer.dist.php .",
3434
"cs:fix": "./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php .",
35-
"psalm": "vendor/psalm/phar/psalm.phar --threads=1",
35+
"psalm": "vendor/psalm/phar/psalm.phar",
3636
"psalm:check": "composer run psalm -- --threads=1 --monochrome --no-progress --output-format=github",
3737
"psalm:fix": "composer run psalm -- --alter --issues=MissingOverrideAttribute,ClassMustBeFinal,PossiblyUnusedMethod,MissingParamType"
3838
},

css/style.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ input.toggle-round+label {
2727
display: block;
2828
position: relative;
2929
cursor: pointer;
30-
margin-right: 20px;
30+
margin-inline-end: 20px;
3131
margin-top: 5px;
3232
margin-bottom: 5px;
3333
padding: 1px;
@@ -55,7 +55,7 @@ input.toggle-round:checked+label {
5555
}
5656

5757
input.toggle-round:checked+label:after {
58-
margin-left: 30px;
58+
margin-inline-start: 30px;
5959
}
6060

6161
#advanced_settings {

psalm.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
xmlns="https://getpsalm.org/schema/config"
88
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
99
>
10+
<phpVersion>8.1</phpVersion>
1011
<projectFiles>
1112
<directory name="lib" />
1213
<ignoreFiles>

0 commit comments

Comments
 (0)