PHP CodeSniffer: ERROR: The specified sniff code "Generic.Files.LineEndings.InvalidEOLChar" is invalid - phpcodesniffer

My attempt to exclude the check for the EOL char on my Windows machine always results in this error message:
>vendor\bin\phpcs.bat --standard=PSR2 --exclude=Generic.Files.LineEndings.InvalidEOLChar src\version.php
ERROR: The specified sniff code "Generic.Files.LineEndings.InvalidEOLChar" is invalid
Run "phpcs --help" for usage information
Can't figure out what I'm doing wrong. I have installed PHP CodeSniffer via composer and am running version 3.4.0.

The --exclude CLI argument accepts 3-part sniffs codes, but you've passed in a 4-part error code.
In your case, the sniff code is Generic.Files.LineEndings and that sniff only generates a single error code, so you'll be fine ignoring the entire sniff:
vendor\bin\phpcs.bat --standard=PSR2 --exclude=Generic.Files.LineEndings src\version.php
If you want to exclude individual error codes, or if you just want to lock down a standard for your project, you'll need to use a ruleset.xml file: https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset

Related

wine, console program, gtk error messages

From the linux console I run a windows console tool using:
wine console_tool.exe ....
The console tool does not involve any windows. It's output is just textual.
Some output is added repeatedly after a given delay time.
However, besides the output of the console_tool.exe I get repeatedly the following error message also interleaved with the other output:
ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
I already tried to export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 but then the only change is that the error message changes:
ERROR: ld.so: object '/usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (wrong ELF class: ELFCLASS64): ignored.
I also attempted to apt install the :i386 version of the libgtk3-nocsd.so.0 but it doesn't seem to exists.
I don't know why a console application may trigger a gtk error message. This is beyond my knowledge.
My preferred goal would be to tell wine that the .exe does not use windows and it does not need to not use gtk for windows emulation at all. However, as this may not be possible, my second preferred goal would be to solve the gtk issue.
Can you help me achieve at least one of those goals?
I do not know what the error messages mean. However, the wineconsole command runs console executable using wine. Example:
wineconsole console_tool.exe

VTS few test cases give syntax error unexpected 'newline' and module gets reported as incomplete (inspite of test cases pass)

/data/local/tmp/VtsHalBiometricsFaceV1_0TargetTest/VtsHalBiometricsFaceV1_0TargetTest.config[1]: syntax error: unexpected 'newline'
Total Tests : 1
PASSED : 1
FAILED : 0
IMPORTANT: Some modules failed to run to completion, tests counts may be inaccurate.
============== End of Results ==============
Issue : Test case is passing but module is not getting reported as completed.
Issue seen with only Android 11 based VTS suites and works well with older android flavor VTS suites.
Environment of 18.04.2 LTS ubuntu and few modules inspite of passing the test cases it does not report a module pass (only for few modules) and shows it as Done=false in results report.
Logs indicate this kind of errors pointing to various .config files.
Any idea / suggestion what could be issue ?
This was asked again in syntax error: unexpected 'newline' in .config file in android vts and that got an answer that if you've modified the vts-tradefed file, then this error appears.
Additionally I noticed that even chmod changes can cause this problem to appear.

Error: "Decoding error (36) : Dictionary mismatch" using ZSTD decode on command line to decode a .ZST file

I am trying to decode a bunch of .ZST files which I do not know what the original file was so I can access them, however all of the .ZSTs return the exact same error and do not get decompressed. The error is Decoding error (36) : Dictionary mismatch. The command used is zstd -d * on Windows 10 x64 using ZSTD v1.4.4 for Win x64.
I have already tried CMD, PowerShell and Bash as different environments to run the command but all return the exact same error. I have tried decompressing a single individual file to see if it was a bulk-operation issue but it didn't work either. My last attempt was to Google for the error but I could not find anything.
Edit: After investigating a little further, I decided to try checking for the MIME types of my ZST files, some of them get returned as application/x-zstd while others get returned as application/octet-stream. I wonder if this could be the issue? Although neither MIME types work, both return the same error.
Does anyone know how I could fix this error and get to decompress my files?
Here is one of the ZST files for reference: https://mega.nz/#!eV0VTKBQ!WBW_pVIq8Tsn2Rrv3XKmt4DSAH7IHbHtaAuNB9uRTMQ

GOBJECT_INTROSPECTION_CHECK syntax error on configure

On "./configure" of an open source project I get:
user agent OS = Linux
./configure: line 13957: syntax error near unexpected token 0.9.3'
./configure: line 13957: GOBJECT_INTROSPECTION_CHECK(0.9.3)'
make: *** [config.status] Error 2
Ubuntu 12.04 package "gobject-introspection" and "libgirepository1.0-dev" are present. Removing the GOBJECT_INTROSPECTION_CHECK line allows configure to complete, but the project fails a dependency later.
How can I get past this configure step cleanly? Googling for this issue shows bugs filed against numerous OS projects for this same blocking issue, but the usual answer is "install gobject-introspection".
As the OP discovered on his own he had to install the gobject-introspection package to get the m4 macros that were being used.
The error message has the raw macro in it, as configure scripts are generated from configure.in/configure.ac files via m4/etc the fact that the raw macro is in the output file indicates that the macro did not get translated at generation time.
The gobject-introspection m4 files were apparently installed after autogen.sh (or equivalent) was run to generate the configure script. Re-running the autogen.sh script should regenerate the configure script and run the macro correctly.

Getting Error in config.txt file of NetSim Simulator

When I open NetSim's Config.txt file after Simulation I get the following error:
Error in config file ---
1) Unknown xml tag "UPDATE_TIMER" in line number 166.
Tag path: TETCOS_NETSIM/NETWORK_CONFIGURATION/DEVICE_CONFIGURATION/DEVICE
[3] /LAYER [2]/ROUTING_PROTOCOL/PROTOCOL_PROPERTY
However, Simulation runs Successfully. What does this mean?
You need to specify the missing parameters in the Configuration file which are mentioned in the "ConfigLog.txt". Since, NetSim will crash if all the required parameters are not configured, NetSim addresses this issue by enabling default values where ever required. Error produced in the "ConfigLog.txt" because the value for the "UPDATE_TIMER" for "ROUTING_PROTOCOL" is not specified in the Configuration file. In order to obtain accurate metrics for the desired scenario you need to update your Configuration.xml file.

Resources