Installing codesniffer

P

Peter Pitchford

Guest
I downloaded codeSniffer, but I haven't been able to figure out how to install it. Where do I upload it to, and how do I custom configure an include_path ?
 


Sorry, I've never heard of codesniffer before, so I've had to google it... Or rather, duckduckgo it! :)

Is this the codesniffer program you are talking about? (<< see link)
If so, have you taken a look at the codesniffer project's website? ( << see link )
There some pretty clear instructions here! (<< see link )

Hopefully the links above will help you! It looks like it is a fairly standard python installation procedure. I don't know what distro you are using, but as long as you aren't using anything too obscure, the pip installation method should work (see 3rd link):
Code:
pip install code-sniffer
That is, as long as you have pip installed! If not, pip should be available in the repos of whatever distro you are using, so you could install it via whatever package manager your chosen distro uses.

Otherwise the manual installation method should work.
With the manual installation, you'll need to extract the archive (.tar.gz / .zip etc), then navigate into the extracted directory and run the following commands (as per the 3rd link above):
Code:
python setup.py build
sudo python setup.py install
Note: The 2nd command requires root access in order to install the program. So sudo has been used to temporarily grant the user root access for that command. If you are using a distro that does not use sudo, then switch to root using whatever method your distro requires. (usually via su)

BTW for future reference:
In order to get good, concise answers here; it helps to include some information about the Linux distro/version you are currently using.
 
Is this the same thing as PHP-CodeSniffer?

In, for example Debian, PHP-CodeSniffer is available from Repository... and as such it will get automagically installed.

The distro you are using is crucial to our answers...
 
Yes I am talking about PHP-Codesniffer
If you search google for "php_codesniffer" the first link is the PEAR download page.
I have tried using
pear install PHP_CodeSniffer-2.0.0RC2
at the command line but it doesn't recognize the pear command

I don't know what distro it is. When I do
uname -r
it says
2.6.18-471.3.1.el5.lve0.8.72

I have no idea what that means or how to find out.
 
If you Google
2.6.18-471.3.1.el5.lve0.8.72
it leads to CloudLinux. Is that what is being used here?

CloudLinux is not free. I think it costs $14 a month for one server licence. But it has a "free" Support Service: http://cloudlinux.com/about/support.php

If you are using CloudLinux you might be better to use their support...
 

Staff online

Members online


Latest posts

Top