• Stars
    star
    810
  • Rank 55,873 (Top 2 %)
  • Language
    Python
  • License
    Other
  • Created over 12 years ago
  • Updated 11 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ” PHP CodeSniffer, PHP Coding Standard Fixer, Linter, and Mess Detector Support for Sublime Text

sublime-phpcs

This plugin adds PHP CodeSniffer, PHP Code Beautifier and Fixer, PHP Coding Standards Fixer, the PHP Linter, PHP Mess Detector, Scheck support to Sublime Text.

For more information about this plugin such as features, installation requirements etc, please click here

Configuration

You will need to configure this plugin to work for your setup, please view the options here

FAQ

What do I do when I get "OSError: [Errno 8] Exec format error"?

  • This seems to be an issue you may get with regards to wrapper scripts.
  • Please make sure that the application/script you are referencing has the correct shebang line, as per GH-79

What do I do when I get "OSError: [Error 2] No such file or directory"?

  • Well, first of all you need to check that you have PHP_CodeSniffer, and if being used, the phpmd application.
  • If you have these applications installed, then it sounds like those applications are not in your PATH, or cannot be found in your PATH by the Python runtime, so configure "phpcs_php_path", "phpcs_executable_path", "phpmd_executable_path" and "php_cs_fixer_executable_path" with the actual paths to those applications

What do I do when I get "OSError: [Errno 13] Permission denied"?

  • It sounds like your path settings are incorrect.
  • You need to make sure that when you specifiy the path you include the entire path including the application
$ which phpcs
/usr/local/bin/phpcs
  • That entire output is the path you need in your configs.

What if I've installed the applications using Homebrew?

If you have installed php-cs-fixer, phpmd or phpcs via homebrew then please make sure that you define the "*_executable_path" option to the .phar application and not the wrapper script that is placed in your bin folder, as this will cause odd behaviour.

What other Key Bindings can I setup?

The following is a list of commands that you can bind to a keyboard shortcut:

  • phpcs_fix_this_file
  • phpcs_clear_sniffer_marks
  • phpcs_goto_next_error
  • phpcs_show_previous_errors
  • phpcs_sniff_this_file

In order to achieve this you need to add the following to one of your key bindings settings file:

{ "keys": ["ctrl+super+t"], "command": "phpcs_clear_sniffer_marks" }

To decide which "Fixer" to use, you can do:

{ "keys": ["super+k", "super+f"], "command": "phpcs_fix_this_file", "args": {"tool": "CodeBeautifier"}},

or

{ "keys": ["super+k", "super+f"], "command": "phpcs_fix_this_file", "args": {"tool": "Fixer"}},

You can then change the ctrl+super+t combination to something of your choosing.

More Repositories

1

dotfiles

βŠ™ All the dotfiles needed to make the world a better place
Shell
53
star
2

xdebug-toggler

[DEPRECATED] Toggle the debugging session for Xdebug from within the Safari browser
HTML
52
star
3

hugo-deploy-gh-pages

πŸ“¦ A GitHub Action to build and deploy a Hugo site to GitHub Pages
Shell
52
star
4

go-azuredevops

πŸ“• A Go client library for accessing the Azure DevOps API
Go
29
star
5

obsidian-multi-cursor

πŸͺ An Obsidian plugin for multi-cursor support
TypeScript
28
star
6

atom-php-checkstyle

βœ… [DEPRECATED] Checkstyle reporter for PHP, utilising phpcs, phpmd, php linter and php-cs-fixer
CoffeeScript
21
star
7

gollum-page-watcher-action

πŸ“¦ A GitHub Action to watch for GitHub Wiki Page changes, and then notify a Slack channel
Go
15
star
8

donny

βš™οΈ CLI application for retrieving data from Azure DevOps
Go
11
star
9

mac-box

πŸ“¦ Ansible playbooks to setup a local mac
Makefile
9
star
10

sublime-phpdocumentor

[DEPRECATED] phpDocumentor Support for Sublime Text 2
Python
9
star
11

precis

⌨️ A terminal dashboard which gives an overview of useful things
Go
9
star
12

walter

βš™οΈ CLI application for retrieving data from Jira
Go
8
star
13

sublime-jenkins-dashboard

[DEPRECATED] Sublime Text plugin to allow interaction with a Jenkins Installation
Python
6
star
14

prolificli

πŸ”¬ A CLI application to get some data out of Prolific
Go
6
star
15

trello-cli

βš™οΈ Small Trello CLI application for managing a Trello board in a Scrum environment
PHP
5
star
16

hagen

βš™οΈ CLI application for getting information out of GitHub
Go
4
star
17

linux-box

πŸ“¦ Ansible playbooks to setup a linux based boxes: raspberry pi, and ubuntu
Makefile
3
star
18

sublime-pman

[DEPRECATED] Access to the php manual from within Sublime Text
Python
3
star
19

technical-workshops

πŸ“š Content for Technical Workshops
2
star
20

jenkins-example

πŸ— An example of a dockerised Jenkins solution for local testing.
Makefile
2
star
21

baldrick

πŸ’¬ A very very very basic chat bot
JavaScript
2
star
22

lionel

βš™οΈ CLI application for retrieving data from Trello
Go
2
star
23

benmatselby.github.io

πŸ‘¨β€πŸ’» Just another person on the planet
HTML
2
star
24

ringli

βš™οΈ A CLI tool to get some data from Circle CI
PHP
1
star
25

nextjs-blog

πŸ‘©β€πŸ’» Example from the Next.js website
JavaScript
1
star
26

sugarcrmcandybar

🍭 Search the SugarCRM application from your Mac menu bar
Swift
1
star
27

coding-exercises

πŸ‘¨β€πŸ’»Coding exercises
JavaScript
1
star
28

places

🌍 Walking the earth
JavaScript
1
star
29

next-form

πŸ“œ Implement react-hook-form in Next.js
TypeScript
1
star
30

playground-firestore

πŸ› An area to play around with the firestore sdk
Go
1
star
31

next-supabase-avatar

πŸ§ͺ Example Supabase and Next.js project from the supabase docs
JavaScript
1
star
32

benmatselby

🏑 Me
1
star
33

recipes

πŸ§‘πŸ»β€πŸ³ Family recipes built using Next.js
JavaScript
1
star
34

knope

βš™οΈ CLI tool to get build data out of AWS CodeBuild
Go
1
star
35

terratest-examples

πŸ§ͺ Example repo to showcase some Terratest
Go
1
star
36

frost

πŸ₯Ά CLI application for getting certain kinds of data out of various build and work management tools and into the terminal, where we belong...
Go
1
star