Cannot generate HTML file from cppcheck.xml on linux - html

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.

Related

Error `Unable to find a template property named $schema.` when trying to decompile JSON into Bicep

I'm playing with Azure Bicep and I was expecting that I can take practically any ARM JSON template and translate it into Bicep. I'm intentionally using the word "translate" instead of "decompile" here, because the JSON template was not originally created with Bicep, so it was not compiled from Bicep to JSON in the first place.
I'm creating a VM deployment in the Azure Portal and when it's successfully deployed I download the JSON template (deployment.json and deployment_operations.json).
Then I run the following command:
bicep decompile deployment.json
The command fails with the following error message:
/deployment.json: Decompilation failed with fatal error "[1:1]: Unable to find a template property named $schema."
What should I do to resolve this error?
Bicep CLI version 0.13.1 (e3ac80d678).
PS The VM deployment is the simplest possible Windows Server VM with no data disks and extra features. Created via Azure Portal by clicking Next-Next-Create.
It appears that I've found the solution when writing the question. I was downloading and trying to decompile a wrong file.
The problem was that I was downloading the deployment.json file instead of an actual template file template.json. You need to click Download on the Template tab.
So instead of downloading the from the Overview tab, click the Template tab and then click Download. Or use the Save-AzResourceGroupDeploymentTemplate PowerShell cmdlet.
Similar problem, same solution: https://github.com/Azure/bicep/issues/5237

HelpNDoc : Problem to generate CHM format help - Error HHC5010

I would like to generate a CHM help file with HelpNDoc.
But I get an error message:
HHC5010: Error: Cannot open "c:\users\philippeDocuments\HelpNDoc\Output\chm\creabook.chm". Compilation stopped.
I tried to create the CHM folder myself, in the "Output" folder but no result.
I'm running Ubuntu 22.04.1 LTS and using Wine as a Windows emulator.
Maybe it's an authorization issue?
What is surprising is that I was able to generate the Word and html documentation.
Is someone can help me ?
I do not use Ubuntu or Wine as an environment and would like to recommend a machine with Windows for compiling CHM help files.
Despite the close connection of CHM help files with the Windows operating system, I do not want to completely exclude the possibility of compiling in a Wine environment.
My good old compiler Error Message Reference shows the following:
HHC5010: Cannot open ""file name"". Compilation stopped.
Problem: The specified file either doesn't exist, or another program has it open and is denying permission to read the file.
Result: The .chm file is corrupt and cannot be used.
Solution: If another program does have the file open, close the program. Otherwise either correct the name in your project file or remove it.
Please make sure that the CHM help file "c:\users\philippeDocuments\HelpNDoc\Output\chm\creabook.chm" is not open in Wine's HTML help viewer by using e.g. wine hh creabook.chm.
Please also try if you can open another CHM help file in your environment. Maybe you have to specify a windows path, e.g.
wine hh.exe `winepatch -w /some/dir/somefile.chm`
As mentioned above, this is somewhat problematic outside of Windows.
See also some notes at Installing Microsoft HTML Workshop under Wine

'[Error] Unable to find or read "package.json" in the CWD. The "release-react" command must be executed in a React Native project folder.'

I've been getting this error while trying to create a script file to automate a little of the codePush deployment process.
Looking at all the information I could find online wasn't helping - In the script I echo'd the PWD to see that I am running the code-push release-react command from the correct location in my .sh file, I am including react-native as a package dependency in my package.json. Everything looked fine, but I was still getting the error.
Since I found the issue but couldn't find anything online to point to what the problem was, I'll post the answer below.
Upon playing with the scripts in my package.json I tried running npm install again to make sure everything was setup properly when I get an error that actually showed me my issue.
The problem was the JSON in my package.json had become corrupted - the syntax wasn't spot on. I had started playing with the json in the file and forgot to revert the changes I made when I finished and had an extra comma.
Now that almost a whole day is gone, I can get back to work.

Trouble installing PHP Code Sniffer

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.

xxx.mex: failed to load: No such file or directory

For some time, I've been using some .mex files I created. Now I have a new computer. I copied all the files over and reinstalled Cygwin and Octave. When I try to execute any of the .mex routines I get a message like:
error: testm: /cygdrive/c/A/Cwin/...../quad.mex: failed to load: No such file or directory
The file is definitely there and I'm having no trouble loading .m files from the same directory. It does not say there is anything wrong with the file. I'm guessing this is some sort of configuration problem. I am running Octave 4.2.1. When I start it, I get the following message:
Octave was configured for "x86_64-unknown-cygwin".
Could that have something to do with it? I think I'm developing x64 paranoia, since all my Excel .dll macros no longer work either. Thanks.