Skip to content

Instantly share code, notes, and snippets.

@soham2008xyz
Created October 31, 2023 13:16
Show Gist options
  • Save soham2008xyz/0fa12cb410ce77ecc203746256e22056 to your computer and use it in GitHub Desktop.
Save soham2008xyz/0fa12cb410ce77ecc203746256e22056 to your computer and use it in GitHub Desktop.
JetBrains Qodana code inspection config for Laravel/PHP projects
#-------------------------------------------------------------------------------#
# 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.starter
# Enable inspections
# include:
# - name: <SomeEnabledInspectionId>
# Disable inspections
# exclude:
# - name: <SomeDisabledInspectionId>
# paths:
# - <path/where/not/run/inspection>
php:
version: 8.1 # (Applied in CI/CD pipeline)
# Execute shell command before Qodana execution (Applied in CI/CD pipeline)
# bootstrap: sh ./prepare-qodana.sh
# Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
# plugins:
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
# Specify Qodana linter for analysis (Applied in CI/CD pipeline)
linter: jetbrains/qodana-php:latest
include:
- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment