GithubHelp home page GithubHelp logo

jeremiah-c-leary / eda-log-file-warning-suppressor Goto Github PK

View Code? Open in Web Editor NEW
2.0 4.0 1.0 207 KB

Suppresses warnings in EDA logfiles.

License: GNU General Public License v3.0

Python 100.00%
vhdl verilog eda logfile warning suppress suppression xilinx microsemi

eda-log-file-warning-suppressor's Introduction

EDA Log File Warning Suppressor (ELFWS)

Suppresses warnings in EDA logfiles.

Github Release PyPI Version Build Status Test Coverage Read The Docs

Codacy

Maintainability

Table of Contents

Overview

ELFWS was created after going through warning triage for an FPGA design. The synthesis tool provided the ability to suppress warnings, but only at the warning id level. The place and route tool did not supply any ability to suppress warnings. Eventually a design change induced a new warning. Unfortunately, it was not detected until much later in the design process. A design change was required to resolve the warning. The change was minor, but could have resulted in major design changes if it could not have been resolved.

Key Benefits

  • Standardizes warning suppression definition
  • Provides warning suppression for tools that do not support suppressions

Key Features

  • Warning definition
    • Uses YAML to define suppression rules
    • Can include justifications for warning suppression
  • Continuous Integration tool support
    • command line tool
    • outputs JUnit XML files
  • Audit Reports
    • which rules suppressed which warnings
    • rules which did not suppress any warnings
    • warnings which were suppressed by multiple rules

Installation

You can get the latest released version of ELFWS via pip.

pip install elfws

The latest development version can be cloned...

git clone https://github.com/jeremiah-c-leary/eda-log-file-warning-supressor.git

...and then installed locally...

python setup.py install

Usage

ELFWS can be invoked using elfws at the command line prompt:

$ elfws
usage: elfws [-h] {create,report,show,suppress,version} ...

Suppresses Warnings in logfiles.

positional arguments:
  {create,report,show,suppress,version}
    create              Create suppression file
    report              Generate an audit report
    show                Show warnings in logfiles
    suppress            Suppresses warnings in logfiles
    version             Displays ELFWS version information

optional arguments:
  -h, --help            show this help message and exit

ELFWS has five subcommands: create, report, show, suppress and version.

create

Use the create subcommand to generate a suppression rule file from a given warning file.

This can be used as a starting point for a suppression file. Care should be taken as the output messages are not formatted to support regular expressions.

The arguments for the subcommand can be listed using the -h option:

$ elfws create -h
usage: elfws create [-h] [--suppression_file SUPPRESSION_FILE]
                    log_file output_suppression_file

positional arguments:
  log_file              Log file with warnings to extract
  output_suppression_file
                        Suppression file to create

optional arguments:
  -h, --help            show this help message and exit
  --suppression_file SUPPRESSION_FILE
                        Existing suppression file to filter out existing

report

Use the report subcommand to generate detailed output of suppression warnings.

The report will show the following information:

  • Unsuppressed warnings
  • Which suppression rules suppressed which warnings
  • Unused suppression rules
  • Warnings that were suppressed by multiple suppression rules
  • Summary of suppression rules and warnings

The report can be used during reviews to ensure the suppressions are valid.

This command has the option argument --junit, which will output a JUnit XML file. This file can be used with continuous integration tools to check for new warnings.

The arguments for the subcommand can be listed using the -h option:

$ elfws report -h
usage: elfws report [-h] [--junit JUNIT] log_file suppression_file report_file

positional arguments:
  log_file          Log file to check for warnings
  suppression_file  YAML formatted warning suppression file
  report_file       Output report file

optional arguments:
  -h, --help        show this help message and exit
  --junit JUNIT     Generate JUnit XML file JUNIT

show

Use the show subcommand to list all the warnings in a logfile.

This can be useful when first starting out suppressing warnings and a suppression rule file does not exist.

The arguments for the subcommand can be listed using the -h option:

$ elfws show -h

usage: elfws show [-h] log_file

positional arguments:
  log_file    Log file to show warnings

optional arguments:
  -h, --help  show this help message and exit

suppress

Use the suppress subcommand to suppress warnings in a logfile.

This can be useful when creating a suppression rule file. It reports the results to the screen and only shows warnings which have not been suppressed.

This subcommand can also be used to support a continuous integration (CI) flow using the --junit option. The --junit option will create a JUnit XML file which can be read by CI tools.

The arguments for the subcommand can be listed using the -h option:

$ elfws suppress -h

usage: elfws suppress [-h] log_file suppression_file

positional arguments:
  log_file          Log file to check for warnings
  suppression_file  YAML formatted warning suppression file

optional arguments:
  -h, --help        show this help message and exit

version

Use the version subcommand to report the installed version of ELFWS.

There are no arguments for this subcommand.

$ elfws version

EDA Log File Warning Suppressor (ELFWS) version 1.0.0

Documentation

All documentation for ELFWS is hosted at read-the-docs.

Contributing

I welcome any contributions to this project. No matter how small or large.

There are several ways to contribute:

  • Bug reports
  • Code base improvements
  • Feature requests

Please refer to the documentation hosted at read-the-docs for more details on contributing.

eda-log-file-warning-suppressor's People

Contributors

dependabot[bot] avatar jeremiah-c-leary avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

svenka3

eda-log-file-warning-suppressor's Issues

Refresh documentation

There are references to the old name of the tool that should be updated.

This would include spelling and grammar and making the documentation easier to read.

Add section on CI support.

Tests will fail if a file is being edited.

Some editors leave a file for backup while editing. For example vim uses .swp files. This causes tests to fail as those files are being pulled in.

Filter out files which do not end in py

Remove unused test files

There are files left behind by the tests which are committed. Update tests to remove the files after executing and remove the committed files.

Suppress table output if no warnings were found

There are several instances where the table header and footer are printed when there are no warnings to print.

I would be cleaner to only print the table header and footer only if there are warnings.

Exit codes

Add different exit codes based on analysis.

Need to read Xilinx Vivado log file

The logfile that is outputted from Xilinx has this identifier:

#------------------------------------------------------------
# Vivado v2018.3 (64-bit)
# SW Build
# IP Build
# Process ID:
# Current directory:
# Command line:
# Log file
# Journal file:
#------------------------------------------------------------

This is different than the runme.log files and has additional warnings in it from IP generation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.