Skip to content

Commit 5910308

Browse files
Merge pull request #20 from eliashaeussler/bugfix/editorconfig-lint
[BUGFIX] Exclude generated JavaScript files from .editorconfig linting
2 parents 56dc081 + 342a704 commit 5910308

File tree

6 files changed

+36
-3
lines changed

6 files changed

+36
-3
lines changed

.editorconfig-lint.php

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
/*
6+
* This file is part of the TYPO3 CMS extension "warming".
7+
*
8+
* Copyright (C) 2022 Elias Häußler <elias@haeussler.dev>
9+
*
10+
* This program is free software: you can redistribute it and/or modify
11+
* it under the terms of the GNU General Public License as published by
12+
* the Free Software Foundation, either version 2 of the License, or
13+
* (at your option) any later version.
14+
*
15+
* This program is distributed in the hope that it will be useful,
16+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18+
* GNU General Public License for more details.
19+
*
20+
* You should have received a copy of the GNU General Public License
21+
* along with this program. If not, see <https://www.gnu.org/licenses/>.
22+
*/
23+
24+
return \Symfony\Component\Finder\Finder::create()
25+
->files()
26+
->in(__DIR__)
27+
->ignoreVCSIgnored(true)
28+
->exclude([
29+
'Resources/Public/JavaScript',
30+
])
31+
;

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
/Tests export-ignore
44
/.crowdin.yaml export-ignore
55
/.editorconfig export-ignore
6+
/.editorconfig-lint.php export-ignore
67
/.gitattributes export-ignore
78
/.gitignore export-ignore
89
/.php-cs-fixer.php export-ignore

.github/workflows/cgl.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- name: Lint composer.json
3838
run: composer lint:composer -- --dry-run
3939
- name: Lint Editorconfig
40-
run: .Build/bin/ec --git-only
40+
run: .Build/bin/ec --finder-config .editorconfig-lint.php
4141
- name: Lint PHP
4242
run: composer lint:php -- --dry-run
4343

captainhook.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"enabled": true,
1515
"actions": [
1616
{
17-
"action": ".Build/bin/ec --git-only",
17+
"action": ".Build/bin/ec --finder-config .editorconfig-lint.php",
1818
"options": [],
1919
"conditions": [
2020
{

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
"@lint:php"
7777
],
7878
"lint:composer": "@composer normalize --no-check-lock --no-update-lock",
79-
"lint:editorconfig": "ec --fix --git-only",
79+
"lint:editorconfig": "ec --finder-config .editorconfig-lint.php --fix",
8080
"lint:php": "php-cs-fixer fix",
8181
"sca": [
8282
"@sca:php"

packaging_exclude.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
'crowdin.yaml',
4444
'dependency-checker.json',
4545
'editorconfig',
46+
'editorconfig-lint.php',
4647
'gitattributes',
4748
'gitignore',
4849
'packaging_exclude.php',

0 commit comments

Comments
 (0)