Skip to content

Commit

Permalink
Merge pull request #21 from vinayharwani13/vinay/add-code-linter
Browse files Browse the repository at this point in the history
Added code linter
  • Loading branch information
christyjacob4 authored Dec 20, 2022
2 parents 1d4f666 + 9ba2d76 commit f9fa340
Show file tree
Hide file tree
Showing 17 changed files with 659 additions and 594 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Linter"

on: [pull_request]
jobs:
lint:
name: Linter
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 2

- run: git checkout HEAD^2

- name: Run Linter
run: |
docker run --rm -v $PWD:/app composer sh -c \
"composer install --profile --ignore-platform-reqs && composer lint"
7 changes: 6 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
"keywords": ["php","framework", "upf", "utopia", "orchestration", "docker", "swarm", "kubernetes"],
"license": "MIT",
"minimum-stability": "stable",
"scripts": {
"lint": "./vendor/bin/pint --test",
"format": "./vendor/bin/pint"
},
"autoload": {
"psr-4": {"Utopia\\Orchestration\\": "src/Orchestration"}
},
Expand All @@ -17,6 +21,7 @@
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1"
"vimeo/psalm": "4.0.1",
"laravel/pint": "^1.2"
}
}
Loading

0 comments on commit f9fa340

Please sign in to comment.