Trouble installing PHP Code Sniffer - phpstorm

I'm attempting to install PHP Code Sniffer for PhpStorm, but have been unable to get it to work. I've been following the steps here: https://confluence.jetbrains.com/display/PhpStorm/PHP+Code+Sniffer+in+PhpStorm
I added PHP Code Sniffer as a Composer dependency, and it now appears in the project directory. I then went to the code sniffer settings page, where I entered the path to the PHPCS.bat file. When I click Validate, I get an error message saying "Can not run PHP Code Sniffer".
Have I missed a step or is there a log somewhere with more information on what is not working?

I solved the same problem by editing the phpcs.bat file and replacing the paths:
PHPBIN=#php_bin#
with
PHPBIN=path\to\php.exe
and
"%PHPBIN%" "#bin_dir#\phpcs" %*
with
"%PHPBIN%" "path\to\phpcs" %*

I had the same issue, I solve it adding the php path to the PATH environment variables on windows. Because when it runs the scripts needs to run php and if it not present on the global path of windows will fail.

Related

HTML launch.json [duplicate]

Trying to debug my javascript code in Visual Studio. Selected "Start Debugging" and I get the following error message "configuration 'Run Current File' is missing in launch.json" (not pictured--error msg vanished after 5 seconds). I also got redirected to this launch.json file but have no idea what I need to type here.
I already have installed Node.js. I have restarted my computer, as well as edited the syntax of my javascript before debugging.
I am very very new to programming and am not sure what could be missing. Help please!
launch.json is used for to launch an app for debugging. It has settings geared for things like mapping to your workspace source code or defining the Chrome port to use.
Check full details here

Heroku deployment: 'Cannot find module '...mime.js Please verify package.json has valid "main" entry

I am working on a React app with a MySQLdb and am trying to deploy with Heroku. I have followed a guide closely and am using JAWS DB hook to connect my db to Heroku. I am running into this error when I run the "heroku open" command after pushing to heroku:
"Error: Cannot find module '/app/node_modules/mime/mime.js'. Please verify that the package.json has a valid "main" entry"
My package.json has mime.js installed as a devDependency. I have set the "main" line in my package.json to "index.js" as well.
Repo: https://github.com/AndrewCodesDontYaKnow/ReactCalc
Anyone have any experience with this type of issue? Thanks much.
I just had the same problem with a different module ("telebot" in my case)
I didn't figure out how to fix the issue (if anyone else finds this, I'd also like to know how to fix it), but I got it to work with a work around...
I copied the module source, and put it into my repo, and just used it as a local module...
(in my case I had by my .gitignore file ignore any "lib" folder, it gave me a hard time until i realized the lib folder from the telebot folder is just not getting uploaded to GitHub, and as such not getting to heroku, but after commenting it out, and getting it to upload, the local module worked as intended)
also, I don't think this is an actual answer, but I don't have the rep to comment, so I hope this helps

Cannot generate HTML file from cppcheck.xml on linux

I am trying to generate HTML file from the cppcheck.xml file. But i keep getting the following error : -bash: htmlreport/cppcheck-htmlreport: No such file or directory
I have installed the cppcheck and the htmlreport/cppcheck-htmlreport is also added to /usr/bin. I dont know what to do next. I cant find anythong related to this error on the internet.
I have to publish the cppcheck.xml on the jenkins UI. But the job i have is a multibranch pipeline and it doesnt support the cppcheck plugin. So I am left with no other option but to convert the cppcheck.xml to html and then publish that on the jenkins. This is also now getting error. Please tell how i should proceed further.

Object not found - XAMPP

I recently installed XAMPP on my laptop - windows-7 64-bit. I just wrote a very basic and elementary "Hello World" script in HTML. But, however when i'm trying to run it, it says Object Not found. Error 404.
Here's what i'm doing:
Wrote the script.
Saved it as test.html in xampp/apache/htdocs.
Opened the browser, typed localhost/test.html in the space provided for the URL.
The bizarre thing is, i am able to run the index.html file stored in xampp/apache/htdocs. And i'm also able to run the localhost page. But any new page that i'm creating, i'm unable to run it. Please help me solve this problem.
Thank you in advance :)
It seems xampp is not able to locate your file.
Check DocumentRoot setting in XAMPP\apache\conf\httpd.conf to find currently it is pointing to which folder.
If you want you can point it to some other folder like,
D:/phpprojects/
By the way, You sure htdocs is in xampp/apache/htdocs ? Mine is in xampp/htdocs.
if problem is in linux
Folders not should be cut from Windows into Linux
folders permissions not set . change it
You just need to change the root of project from xampp/apache/htdocs to xampp/htdocs.
I mean your project folder has to be in xampp/htdocs root .(e.g: xampp/htdocs/project).
And your project address will be localhost/project

Parsed Console Output Error in Hudson

im running Hudson continuous integration for db unit.
when i run the job the console output is displaying the SUCCESS, but then why do the Parsed Console Output keep returning this error:
ERROR:Failed to parse console log :
log-parser plugin ERROR: Cannot parse log: Can't read parsing rules file:
i already installed the parse-log plugin & i already restarted the Hudson..
i installed the plugin using remote PC
any help and suggestion is appreciated. Thanks!
1) Place the Parser Rule File in the JENKINS_HOME location.
2) Configure that log parser console output in the Global COnfiguration settings and Name it.
3) Add this option in the Post Build Actions and Select the Name
ok silly me..
i forgot to configure the global configuration in hudson that link to the parser rule file..
problem solved.
I'm posting this in case anyone else has a specific case of this problem. This issue started when upgrading from 1.509.2 to 1.554.3... I had the parsing rules file in the win\system folder which was a known issue when running Jenkins as a service. Well I guess they fixed it by this version. I moved the parsing rules back into Jenkins Home folder and it worked fine again.