Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

Command-line alternative for https://github.com/jenkinsci/warnings-plugin. Useable with plugin-less CI systems.

Project Description

Command line warnings-plugin

Command-line alternative for https://github.com/jenkinsci/warnings-plugin. Useable with plugin-less CI systems. It can be used with GitLab-CI to enable warning threshold setting for failing the job and for parsing warnings from various tools and report them as errors.

Installation

Every release is uploaded to pip so it can be installed simply by using pip.

# Python2
pip2 install mlx.warnings

# Python3
pip3 install mlx.warnings

You can find more details in Installation guide

Usage

Since warnings plugin parses log messages (so far), you will need to redirect your stderr to some text file. You can do that with shell pipes or with command line arguments to command (if it supports outputting errors to file instead of stderr). Be aware that some commands print warnings on stdout.

Pipe example

Below is one of the ways to redirect your stderr to stdout and save it inside file.

yourcommand 2>&1 | tee doc_log.txt

Running command

There are few ways to run warnings plugin. If you are playing with Python on your computer you want to use virtualenv. This will separate your packages per project and there is less chance of some dependency hell. You can initialize virtual environment in current directory by virtualenv . .

Melexis Warnings plugin can be called directly from shell/console using:

mlx-warnings -h

It has also possibility to be called as module from Python2 or Python3. In that case command will look like:

python -m mlx.warnings -h
python3 -m mlx.warnings -h

Help prints all currently supported commands and their usages.

Parse for Sphinx warnings

After you saved your Sphinx warnings to the file, you can parse it with command:

# command line
mlx-warnings doc_log.txt --sphinx
# explicitly as python module
python3 -m mlx.warnings doc_log.txt --sphinx
python -m mlx.warnings doc_log.txt --sphinx

Parse for Doxygen warnings

After you saved your Doxygen warnings to the file, you can parse it with command:

# command line
mlx-warnings doc_log.txt --doxygen
# explicitly as python module
python3 -m mlx.warnings doc_log.txt --doxygen
python -m mlx.warnings doc_log.txt --doxygen

Parse for JUnit failures

After you saved your JUnit XML output to the file, you can parse it with command:

# command line
mlx-warnings junit_output.xml --junit
# explicitly as python module
python3 -m mlx.warnings junit_output.xml --junit
python -m mlx.warnings junit_output.xml --junit

Other options

Since plugin is under active development there are new Features added fast. Important options currently include setting maximum number of warnings or minimum number of warnings, that are still acceptable to return 0 (success) return code. Look at scripts help, for more details about the options.

Issues and new Features

In case you have any problems with usage of the plugin, please open an issue on GitHub. Provide as many valid information as possible, as this will help us to resolve Issues faster. We would also like to hear your suggestions about new features which would help your Continuous Integration run better.

Contribute

There is a Contribution guide available if you would like to get involved in development of the plugin. We encourage anyone to contribute to our repository.

Release History

Release History

This version
History Node

0.0.7

History Node

0.0.6

History Node

0.0.5

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mlx.warnings-0.0.7.tar.gz (18.7 kB) Copy SHA256 Checksum SHA256 Source Jun 27, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting