Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

CivicActions/codeclimate-phpcodesniffer-drupal

 
 

Repository files navigation

Code Climate PHP_CodeSniffer Engine for Drupal

codeclimate-phpcodesniffer-drupal is a Code Climate engine that wraps the PHP_Code Sniffer static analysis tool, configured for Drupal. 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-drupal. 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 list of standards that you want PHP_CodeSniffer to use while analyzing your files.
  • 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-drupal:
    enabled: true
    config:
      file_extensions: "php,module,inc,install,test,profile,theme,js,css,info,txt,md"
      standard: "Drupal,DrupalPractice"
      ignore_warnings: false
      encoding: utf-8
ratings:
  paths:
  - "**.php"
  - "**.module"
  - "**.inc"
  - "**.install"
  - "**.test"
  - "**.profile"
  - "**.theme"
  - "**.js"
  - "**.css"
  - "**.info"
  - "**.txt"
  - "**.md"

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.

About

Code Climate Engine for PHP Code Sniffer

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 99.2%
  • Shell 0.8%
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy