Skip to content

Commit

Permalink
Merge main into sweep/the_calculaterank_function_in_the_tracep_71719
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Mar 5, 2024
2 parents 5959d15 + 4c64185 commit f05fd4f
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/qodana_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Qodana
on:
workflow_dispatch:
push:
branches: [main]

jobs:
qodana:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
id: checkout
with:
fetch-depth: 0

- name: Setup PHP
id: setup-php
if: steps.checkout.outcome == 'success'
uses: shivammathur/setup-php@v2
with:
php-version: "8.1"
extensions: ast, mbstring, pdo, pdo_mysql, xml, zip
coverage: xdebug

- name: Cache Composer Dependencies
id: composer-cache
if: steps.setup-php.outcome == 'success'
uses: actions/cache@v2
with:
path: vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
id: composer-install
if: steps.setup-php.outcome == 'success'
run: composer install --prefer-dist --no-progress

- name: "Qodana Scan"
id: qodana
if: steps.composer-cache.outcome == 'success'
uses: JetBrains/[email protected]
env:
QODANA_TOKEN: ${{ secrets.QODANA_TOKEN }}
with:
pr-mode: false
#args: --apply-fixes,--baseline,qodana.sarif.json
args: --apply-fixes
push-fixes: pull-request
use-caches: true
post-pr-comment: true
upload-result: false
github-token: ${{ github.token }}
47 changes: 47 additions & 0 deletions qodana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
#-------------------------------------------------------------------------------#
# Qodana analysis is configured by qodana.yaml file #
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
#-------------------------------------------------------------------------------#
version: "1.0"

#Specify inspection profile for code analysis
profile:
name: qodana.recommended

php:
version: 8.1 #(Applied in CI/CD pipeline)

linter: jetbrains/qodana-php:latest
include:
- name: PhpVulnerablePathsInspection
- name: VulnerableLibrariesGlobal
- name: PhpCoverageInspection
- name: PhpInconsistentReturnPointsInspection
- name: PhpRedundantOptionalArgumentInspection
- name: PhpTernaryExpressionCanBeReplacedWithConditionInspection
- name: PhpFullyQualifiedNameUsageInspection
- name: PhpUnnecessaryFullyQualifiedNameInspection
- name: DuplicatedCode
- name: PhpReturnDocTypeMismatchInspection
- name: PhpMissingParamTypeInspection
- name: PhpMissingFieldTypeInspection
- name: PhpMissingReturnTypeInspection
- name: PhpDynamicFieldDeclarationInspection
- name: PhpUnusedAliasInspection
- name: PhpUnusedLocalVariableInspection
plugins:
- id: com.kalessil.phpStorm.phpInspectionsEA

exclude:
- name: All
paths:
- resources/views/welcome.blade.php
- storage
- storage/
- storage/*
- storage/**
- vendor
- vendor/
- vendor/*
- vendor/**

0 comments on commit f05fd4f

Please sign in to comment.