Skip to content

Commit

Permalink
Merge pull request #26 from cvette/feature/custom-rules
Browse files Browse the repository at this point in the history
FEATURE: Allow custom rules by including them in the config
  • Loading branch information
cvette authored Dec 22, 2024
2 parents 74ca424 + 7ca0f14 commit 1725609
Show file tree
Hide file tree
Showing 27 changed files with 655 additions and 803 deletions.
8 changes: 4 additions & 4 deletions psalm.xml → .github/linters/psalm.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?xml version="1.0"?>
<psalm
totallyTyped="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
phpVersion="8.1"
>
<projectFiles>
<directory name="src" />
<directory name="../../src" />
<ignoreFiles>
<directory name="vendor" />
<directory name="../../vendor" />
</ignoreFiles>
</projectFiles>

Expand Down Expand Up @@ -50,4 +50,4 @@

<InvalidStringClass errorLevel="info" />
</issueHandlers>
</psalm>
</psalm>
16 changes: 14 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ on:
pull_request:
branches: [master, main]

permissions: { }

###############
# Set the Job #
###############
Expand All @@ -32,6 +34,12 @@ jobs:
# Set the agent to run on
runs-on: ubuntu-latest

permissions:
contents: read
packages: read
# To report GitHub Actions status checks
statuses: write

##################
# Load all steps #
##################
Expand All @@ -40,7 +48,7 @@ jobs:
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
Expand All @@ -49,9 +57,13 @@ jobs:
# Run Linter against code base #
################################
- name: Lint Code Base
uses: github/super-linter@v4
uses: super-linter/super-linter@v7.2.0
env:
VALIDATE_ALL_CODEBASE: false
VALIDATE_PHP_PSALM: true
VALIDATE_PHP_BUILTIN: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_GIT_MERGE_CONFLICT_MARKERS: true
# Change to 'master' if your main branch differs
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
16 changes: 10 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,22 @@
},
"config": {
"platform": {
"php": "8.1"
"php": "8.1",
"ext-dom": "8.1",
"ext-simplexml": "8.1",
"ext-xml": "8.1",
"ext-xmlwriter": "8.1"
}
},
"require": {
"symfony/console": "^5.1",
"symfony/filesystem": "^5.1",
"symfony/yaml": "^5.1",
"symfony/config": "^5.2",
"symfony/console": "^6.4",
"symfony/filesystem": "^6.4",
"symfony/yaml": "^6.4",
"symfony/config": "^6.4",
"php": "^8.1"
},
"require-dev": {
"vimeo/psalm": "^4.6",
"vimeo/psalm": "^5.26",
"phpunit/phpunit": "^9.5"
},
"scripts": {
Expand Down
Loading

0 comments on commit 1725609

Please sign in to comment.