File tree Expand file tree Collapse file tree 9 files changed +2402
-3
lines changed Expand file tree Collapse file tree 9 files changed +2402
-3
lines changed Original file line number Diff line number Diff line change
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
+ name : Lint
7
+
8
+ on :
9
+ pull_request :
10
+ push :
11
+ branches :
12
+ - main
13
+ - master
14
+ - stable*
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ lint :
21
+ runs-on : ubuntu-latest
22
+
23
+ name : eslint
24
+
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v3
28
+
29
+ - name : Read package.json node and npm engines version
30
+
31
+ id : versions
32
+ with :
33
+ fallbackNode : ' ^12'
34
+ fallbackNpm : ' ^6'
35
+
36
+ - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
37
+ uses : actions/setup-node@v3
38
+ with :
39
+ node-version : ${{ steps.versions.outputs.nodeVersion }}
40
+
41
+ - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
42
+ run : npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
43
+
44
+ - name : Install dependencies
45
+ run : npm ci
46
+
47
+ - name : Lint
48
+ run : npm run lint
Original file line number Diff line number Diff line change
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
+ name : Lint
7
+
8
+ on :
9
+ pull_request :
10
+ push :
11
+ branches :
12
+ - main
13
+ - master
14
+ - stable*
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ xml-linters :
21
+ runs-on : ubuntu-latest
22
+
23
+ name : info.xml lint
24
+ steps :
25
+ - name : Checkout
26
+ uses : actions/checkout@v3
27
+
28
+ - name : Download schema
29
+ run : wget https://raw.githubusercontent.com/nextcloud/appstore/master/nextcloudappstore/api/v1/release/info.xsd
30
+
31
+ - name : Lint info.xml
32
+ uses : ChristophWurst/xmllint-action@v1
33
+ with :
34
+ xml-file : ./appinfo/info.xml
35
+ xml-schema-file : ./info.xsd
Original file line number Diff line number Diff line change
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
+ name : Lint
7
+
8
+ on :
9
+ pull_request :
10
+ push :
11
+ branches :
12
+ - main
13
+ - master
14
+ - stable*
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ lint :
21
+ runs-on : ubuntu-latest
22
+
23
+ name : php-cs
24
+
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v3
28
+
29
+ - name : Set up php ${{ matrix.php-versions }}
30
+ uses : shivammathur/setup-php@v2
31
+ with :
32
+ php-version : " 7.4"
33
+ coverage : none
34
+
35
+ - name : Install dependencies
36
+ run : composer i
37
+
38
+ - name : Lint
39
+ run : composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
Original file line number Diff line number Diff line change
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
+ name : Lint
7
+
8
+ on :
9
+ pull_request :
10
+ push :
11
+ branches :
12
+ - main
13
+ - master
14
+ - stable*
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ php-lint :
21
+ runs-on : ubuntu-latest
22
+ strategy :
23
+ matrix :
24
+ php-versions : ["7.4", "8.0", "8.1"]
25
+
26
+ name : php-lint
27
+
28
+ steps :
29
+ - name : Checkout
30
+ uses : actions/checkout@v3
31
+
32
+ - name : Set up php ${{ matrix.php-versions }}
33
+ uses : shivammathur/setup-php@v2
34
+ with :
35
+ php-version : ${{ matrix.php-versions }}
36
+ coverage : none
37
+
38
+ - name : Lint
39
+ run : composer run lint
40
+
41
+ summary :
42
+ permissions :
43
+ contents : none
44
+ runs-on : ubuntu-latest
45
+ needs : php-lint
46
+
47
+ if : always()
48
+
49
+ name : php-lint-summary
50
+
51
+ steps :
52
+ - name : Summary status
53
+ run : if ${{ needs.php-lint.result != 'success' && needs.php-lint.result != 'skipped' }}; then exit 1; fi
Original file line number Diff line number Diff line change
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
+ name : Lint
7
+
8
+ on :
9
+ pull_request :
10
+ push :
11
+ branches :
12
+ - main
13
+ - master
14
+ - stable*
15
+
16
+ permissions :
17
+ contents : read
18
+
19
+ jobs :
20
+ lint :
21
+ runs-on : ubuntu-latest
22
+
23
+ name : stylelint
24
+
25
+ steps :
26
+ - name : Checkout
27
+ uses : actions/checkout@v3
28
+
29
+ - name : Read package.json node and npm engines version
30
+
31
+ id : versions
32
+ with :
33
+ fallbackNode : ' ^12'
34
+ fallbackNpm : ' ^6'
35
+
36
+ - name : Set up node ${{ steps.versions.outputs.nodeVersion }}
37
+ uses : actions/setup-node@v3
38
+ with :
39
+ node-version : ${{ steps.versions.outputs.nodeVersion }}
40
+
41
+ - name : Set up npm ${{ steps.versions.outputs.npmVersion }}
42
+ run : npm i -g npm@"${{ steps.versions.outputs.npmVersion }}"
43
+
44
+ - name : Install dependencies
45
+ run : npm ci
46
+
47
+ - name : Lint
48
+ run : npm run stylelint
Original file line number Diff line number Diff line change @@ -6,3 +6,5 @@ node_modules/
6
6
7
7
/tests /integration /vendor /
8
8
/tests /integration /composer.lock
9
+
10
+ .php-cs-fixer.cache
Original file line number Diff line number Diff line change
1
+ <?php
2
+
3
+ declare (strict_types=1 );
4
+
5
+ require_once './vendor/autoload.php ' ;
6
+
7
+ use Nextcloud \CodingStandard \Config ;
8
+
9
+ $ config = new Config ();
10
+ $ config
11
+ ->getFinder ()
12
+ ->notPath ('build ' )
13
+ ->notPath ('l10n ' )
14
+ ->notPath ('src ' )
15
+ ->notPath ('vendor ' )
16
+ ->notPath ('node_modules ' )
17
+ ->in (__DIR__ );
18
+ return $ config ;
Original file line number Diff line number Diff line change 2
2
"name" : " nextcloud/ldap_write_support" ,
3
3
"type" : " project" ,
4
4
"require-dev" : {
5
- "php-parallel-lint/php-parallel-lint" : " ^1.2"
5
+ "php-parallel-lint/php-parallel-lint" : " ^1.2" ,
6
+ "nextcloud/coding-standard" : " ^1.0"
7
+ },
8
+ "scripts" : {
9
+ "cs:fix" : " php-cs-fixer fix" ,
10
+ "cs:check" : " php-cs-fixer fix --dry-run --diff" ,
11
+ "lint" : " find . -name \\ *.php -not -path './vendor/*' -not -path './build/*' -not -path './node_modules/*' -print0 | xargs -0 -n1 php -l"
6
12
},
7
13
"license" : " AGPLv3" ,
8
14
"authors" : [
You can’t perform that action at this time.
0 commit comments