I'm using Jenkins for continuous integration testing
I'm running a Cake test
My output includes formatted text like the following:
โ [31m[1mErrored[22m[39m ยป [1m14[22m honored โ [1m1[22m errored โ [1m13[22m dropped
Can I add a configuration parameter in my Cakefile which disables this formatting and outputs only plain text?
What options do I have for disabling this formatting and outputting only plain text?
I'm not familiar with CoffeeScript, but if you install the AnsiColor Plugin for Jenkins, that output will be displayed correctly, i.e. with coloured highlighting.
Related
Does anyone know a good way to see generated code coverage reports for a Flutter project in Windows, preferably using VS Code? I know I can generate coverage reports using flutter test --coverage which generates a coverage file (coverage\lcov.info).
But how can I use this in VS Code? I found an extension called Coverage Gutters that I can use to visualize covered lines with a green color. It's not perfect for dart/flutter code but it works OK. An example is that it does not mark green lines for line separated arguments to a method or constructor even if those arguments are included in tests.
But the main problem is that I can't get any visual report of the coverage. There are tools (primarily genhtml) that are used to generate HTML reports from the lcov.info but this does not seem to be available on Windows. Do I need to install the Linux subsystem for Windows 10 and install genhtml that way?
Please let me know if you have tips on how to use code coverage for Flutter in Windows (reports and/or line visualization in VS Code). Thanks!
A way--I wouldn't call it a good way, but at least it's easy and it works--is to install Atom text editor and the Dart and lcov-info packages. Then open your Flutter project and click Ctrl+Alt+c and the coverage report in graphical format will be displayed.
We used ag-grid version 20 in our application and I followed the instructions on how to import the theme and override the scss variables in our React application. Everything went great and worked as expected. We just updated to version 21.0 so we can use the dndSource feature, but our code won't compile anymore. The error we get is
"Module build failed: Error: resolve-url-loader: CSS error
source-map information is not available at url() declaration"
I looked around and this is what libsass library listed:
Windows line breaks
Normal windows linebreaks are CRLF. But sometimes libsass will output single CR characters.
This problem is specific to multiline declarations. Refer to the libsass bug #2693.
If you have any such multiline declarations preceding url() statements it will fail your build.
Libsass doesn't consider these orphan CR to be newlines but postcss engine does. The result being an offset in source-map line-numbers which crashes resolve-url-loader.
Module build failed: Error: resolve-url-loader: CSS error
source-map information is not available at url() declaration
Some users find the node-sass linefeed option solves the problem.
Solutions
Try the node-sass linefeed option by way of sass-loader.
Not sure how to get around this? We use create-react-app and I dont think the team likes the idea of ejecting and then taking over the webpack config.
Short answer - configure your editor to save files with Linux line endings. Stop putting Windows line endings in your source files, and you won't have that problem.
I have a problem with encoding characters when I'm trying to run test. I'm using Symfony 4 framework with package symfony/phpunit-bridge.
I'm running test by command like below:
php bin/phpunit tests/WhovianTest.php
The results looks like below:
As we can see there is a problem with encoding in test's results. I'm using windows 10 operating system and PHPStorm IDE.
How could I solve this problem?
I would be grateful for help.
A standard Windows 10 shell has some issues with the ANSI control characters that are used to display colors (they are quite recognisable with the ?[31; characters being displayed). There are some packages to add them, or you can just turn them off.
The phpunit docs suggest:
On Windows, use ANSICON or ConEmu
Alternatively, you can set colors="false" in the opening tag of your phpunit.xml, or as a command line parameter: --colors=never (try auto as well).
I am exporting eclipse rcp application using "eclipse product export wizard". I want to redirect console logs into a file.
I am doing the below, which is working fine when I run as a eclipse application. It is not reflecting after export.
The Run configurations cover how to run something, i.e. they are the part external(ish)* to your application.
In particular, the Output File and Standard Input and Output settings are ways in the Eclipse development environment to handle redirects of the application.
A quick rundown would be to run the console application like this:
$ path/to/app -application com.example.yourname > file.log
If the shell you are using is Bash, there is a long bit in the manual with further options. Powershell and cmd on windows have similar options.
Of course, if you want your program to write to a file all the time (with a possible command line argument to specify file), you probably will want to code that yourself.
* The reason I put "ish" on external is that some of the settings, like Configuration and Plug-ins are part of what you export, but Arguments, Tracing and Environment are not.
I would like to disable the color escape codes logged from sbt/play. Is this possible? And if it is, is there a way to do it without making changes to the config - i.e. via a command line switch or system property.
Since version 0.13.8 (and possibly earlier) you can now simply use the -no-colors option to sbt. e.g.
sbt -no-colors test
You can simply set the system property sbt.log.noformat to true. If you want to e.g. use SBT inside Vim you can create a script like this:
#!/bin/bash
java -Dsbt.log.noformat=true $JAVA_OPTS -jar "${HOME}/bin/sbt-launch.jar" "$#"
This sounds like your platform does not match the actual jline.terminal property. I am just guessing here but when I pass the parameter as Daniel suggested on a Windows command line I see the color escape codes as well.
Therefore, you have to make sure the property matches your platform, i.e. WindowsTerminal on Windows and UnixTerminal on Unix.
If this does not help, then you might be on an unsupported platform in which case the website suggests to use:
-Djline.terminal=jline.UnsupportedTerminal
Well, you can get colors on Windows by installing Cygwin and passing this parameter:
-Djline.terminal=jline.UnixTerminal
So I'd look up jline parameters to see what disables color coding.
I was able to get colored output from SBT in Cygwin by adding:
-Djline.terminal=jline.UnixTerminal
Additionally I figured out that I also needed to add the following line to Cygwin.bat:
set CYGWIN=tty ntsec
After that is added SBT gives very nice colored output. Additionally I would recommend looking into Console2 as it can hook through Cygwin, but provides a much better interface in my opinion:
http://sourceforge.net/projects/console/