Skip to content

Commit f6470d3

Browse files
vasuvasu
authored andcommitted
add linter.yml
1 parent 462bc4f commit f6470d3

7 files changed

Lines changed: 122 additions & 3 deletions

File tree

.github/workflows/linter.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Linter"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: Linter
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
15+
- run: git checkout HEAD^2
16+
17+
- name: Run Linter
18+
run: |
19+
docker run --rm -v $PWD:/app composer sh -c \
20+
"composer install --profile --ignore-platform-reqs && composer lint"

.history/.github/workflows/linter_20221014172515.yml

Whitespace-only changes.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "Linter"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: Linter
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
15+
- run: git checkout HEAD^2
16+
17+
- name: Run Linter
18+
run: |
19+
docker run --rm -v $PWD:/app composer sh -c \
20+
"composer install --profile --ignore-platform-reqs && composer lint"
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "utopia-php/cli",
3+
"description": "A simple CLI library to manage command line applications",
4+
"type": "library",
5+
"keywords": ["php","framework", "upf", "utopia", "cli", "command line"],
6+
"license": "MIT",
7+
8+
"scripts": {
9+
"test": "vendor/bin/phpunit --configuration phpunit.xml < tests/input.txt",
10+
"lint": "vendor/bin/phpcs",
11+
"format": "vendor/bin/phpcbf"
12+
},
13+
"autoload": {
14+
"psr-4": {"Utopia\\CLI\\": "src/CLI"}
15+
},
16+
"require": {
17+
"php": ">=7.4",
18+
"utopia-php/framework": "0.*.*"
19+
},
20+
"require-dev": {
21+
"phpunit/phpunit": "^9.3",
22+
"squizlabs/php_codesniffer": "^3.6"
23+
},
24+
"minimum-stability": "dev"
25+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "utopia-php/cli",
3+
"description": "A simple CLI library to manage command line applications",
4+
"type": "library",
5+
"keywords": ["php","framework", "upf", "utopia", "cli", "command line"],
6+
"license": "MIT",
7+
8+
"scripts": {
9+
"test": "vendor/bin/phpunit --configuration phpunit.xml < tests/input.txt",
10+
"lint": "./vendor/bin/pint --test",
11+
"format": "./vendor/bin/pint"
12+
},
13+
"autoload": {
14+
"psr-4": {"Utopia\\CLI\\": "src/CLI"}
15+
},
16+
"require": {
17+
"php": ">=7.4",
18+
"utopia-php/framework": "0.*.*"
19+
},
20+
"require-dev": {
21+
"phpunit/phpunit": "^9.3",
22+
"squizlabs/php_codesniffer": "^3.6"
23+
},
24+
"minimum-stability": "dev"
25+
}
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"name": "utopia-php/cli",
3+
"description": "A simple CLI library to manage command line applications",
4+
"type": "library",
5+
"keywords": ["php","framework", "upf", "utopia", "cli", "command line"],
6+
"license": "MIT",
7+
8+
"scripts": {
9+
"test": "vendor/bin/phpunit --configuration phpunit.xml < tests/input.txt",
10+
"lint": "./vendor/bin/pint --test",
11+
"format": "./vendor/bin/pint"
12+
},
13+
"autoload": {
14+
"psr-4": {"Utopia\\CLI\\": "src/CLI"}
15+
},
16+
"require": {
17+
"php": ">=7.4",
18+
"utopia-php/framework": "0.*.*"
19+
},
20+
"require-dev": {
21+
"phpunit/phpunit": "^9.3",
22+
"squizlabs/php_codesniffer": "^3.6",
23+
"vimeo/psalm": "4.0.1",
24+
"laravel/pint": "dev-main"
25+
},
26+
"minimum-stability": "dev"
27+
}

composer.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77

88
"scripts": {
99
"test": "vendor/bin/phpunit --configuration phpunit.xml < tests/input.txt",
10-
"lint": "vendor/bin/phpcs",
11-
"format": "vendor/bin/phpcbf"
10+
"lint": "./vendor/bin/pint --test",
11+
"format": "./vendor/bin/pint"
1212
},
1313
"autoload": {
1414
"psr-4": {"Utopia\\CLI\\": "src/CLI"}
@@ -19,7 +19,9 @@
1919
},
2020
"require-dev": {
2121
"phpunit/phpunit": "^9.3",
22-
"squizlabs/php_codesniffer": "^3.6"
22+
"squizlabs/php_codesniffer": "^3.6",
23+
"vimeo/psalm": "4.0.1",
24+
"laravel/pint": "dev-main"
2325
},
2426
"minimum-stability": "dev"
2527
}

0 commit comments

Comments
 (0)