All Projects → codeclimate → codeclimate-phpcodesniffer

codeclimate / codeclimate-phpcodesniffer

Licence: MIT license
Code Climate Engine for PHP Code Sniffer

Programming Languages

PHP
23972 projects - #3 most used programming language
Dockerfile
14818 projects
Makefile
30231 projects
shell
77523 projects

Projects that are alternatives of or similar to codeclimate-phpcodesniffer

codeclimate-duplication
Code Climate engine for code duplication analysis
Stars: ✭ 96 (+255.56%)
Mutual labels:  quality, static-code-analysis, static-analysis, code-quality, codeclimate, codeclimate-engine
Codeclimate
Code Climate CLI
Stars: ✭ 2,273 (+8318.52%)
Mutual labels:  quality, static-code-analysis, static-analysis, code-quality, codeclimate, codeclimate-engine
codeclimate-eslint
Code Climate Engine for ESLint
Stars: ✭ 86 (+218.52%)
Mutual labels:  quality, static-code-analysis, static-analysis, code-quality, codeclimate, codeclimate-engine
Checkstyle
Checkstyle is a development tool to help programmers write Java code that adheres to a coding standard. By default it supports the Google Java Style Guide and Sun Code Conventions, but is highly configurable. It can be invoked with an ANT task and a command line program.
Stars: ✭ 6,481 (+23903.7%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Sonar Dotnet
Code analyzer for C# and VB.NET projects https://redirect.sonarsource.com/plugins/vbnet.html
Stars: ✭ 466 (+1625.93%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Pep8speaks
A GitHub app to automatically review Python code style over Pull Requests
Stars: ✭ 546 (+1922.22%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Sonar Php
🐘 SonarPHP: PHP static analyzer for SonarQube & SonarLint
Stars: ✭ 288 (+966.67%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Infer
A static analyzer for Java, C, C++, and Objective-C
Stars: ✭ 12,823 (+47392.59%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Static Analysis
⚙️ A curated list of static analysis (SAST) tools for all programming languages, config files, build tools, and more.
Stars: ✭ 9,310 (+34381.48%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
sonarlint4netbeans
SonarLint integration for Apache Netbeans
Stars: ✭ 23 (-14.81%)
Mutual labels:  quality, static-code-analysis, static-analysis
elm-review
Analyzes Elm projects, to help find mistakes before your users find them.
Stars: ✭ 195 (+622.22%)
Mutual labels:  quality, static-code-analysis, code-quality
Sonar Java
☕️ SonarSource Static Analyzer for Java Code Quality and Security
Stars: ✭ 745 (+2659.26%)
Mutual labels:  quality, static-code-analysis, static-analysis
Pmd
An extensible multilanguage static code analyzer.
Stars: ✭ 3,667 (+13481.48%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Pylint
It's not just a linter that annoys you!
Stars: ✭ 3,733 (+13725.93%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Sonarjs
SonarSource Static Analyzer for JavaScript and TypeScript
Stars: ✭ 696 (+2477.78%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+16718.52%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
Cflint
Static code analysis for CFML (a linter)
Stars: ✭ 156 (+477.78%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
static-code-analysis-plugin
A plugin to simplify Static Code Analysis on Gradle. Not restricted to, but specially useful, in Android projects, by making sure all analysis can access the SDK classes.
Stars: ✭ 36 (+33.33%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
qodana-action
⚙️ Scan your Java, Kotlin, PHP, Python, JavaScript, TypeScript projects at GitHub with Qodana
Stars: ✭ 112 (+314.81%)
Mutual labels:  static-code-analysis, static-analysis, code-quality
javascript-test-reporter
DEPRECATED Code Climate test reporter client for JavaScript projects
Stars: ✭ 68 (+151.85%)
Mutual labels:  quality, code-quality, codeclimate

Code Climate PHP_CodeSniffer Engine

Code Climate

codeclimate-phpcodesniffer is a Code Climate engine that wraps the PHP_Code Sniffer static analysis tool. You can run it on your command line using the Code Climate CLI, or on our hosted analysis platform.

PHP_CodeSniffer helps you detect violations of a defined coding standard.

Installation

  1. If you haven't already, install the Code Climate CLI.
  2. Run codeclimate engines:enable phpcodesniffer. This command both installs the engine and enables it in your .codeclimate.yml file.
  3. You're ready to analyze! Browse into your project's folder and run codeclimate analyze.

Config Options

Format the values for these config options per the PHP_CodeSniffer documentation.

  • file_extensions - This is where you can configure the file extensions for the files that you want PHP_CodeSniffer to analyze.
  • standard - This is the comma delimited list of standards that you want PHP_CodeSniffer to use while analyzing your files. You may optionally include a relative path to a custom phpcs ruleset.xml file.
  • ignore_warnings - You can hide warnings, and only report errors with this option.
  • encoding - By default, PHPCS uses ISO-8859-1. Use this to change it to your encoding, e.g. UTF-8.

Sample Config

exclude_paths:
 - "/examples/**/*"
engines:
  phpcodesniffer:
    enabled: true
    config:
      file_extensions: "php,inc,lib"
      standard: "PSR1,PSR2,my_custom_php_ruleset.xml"
      ignore_warnings: true
      encoding: utf-8
ratings:
  paths:
  - "**.php"

Supported Coding Standards

In addition to standards provided by default with PHP_CodeSniffer, the Drupal, WordPress, Yii2, and Magento Extension coding standards are supported. Here is the full list:

  • Drupal
  • DrupalPractice
  • MEQP1
  • MEQP2
  • MySource
  • PEAR
  • PHPCS
  • PSR1
  • PSR2
  • Squiz
  • WordPress
  • WordPress-Core
  • WordPress-Docs
  • WordPress-Extra
  • WordPress-VIP
  • Yii2
  • Zend

Need help?

For help with PHP_CodeSniffer, check out their documentation.

If you're running into a Code Climate issue, first look over this project's GitHub Issues, as your question may have already been covered. If not, go ahead and open a support ticket with us.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].