Commit 7d6d0687 authored by Jack Koenig's avatar Jack Koenig Committed by Mergify
Browse files

Add support for configurable warnings (#3414)

Warnings have been assigned unique integers to use as identifiers for
purposes of documentation and configuration.

New CLI option --warn-conf accepts a comma-separated sequence of
<filter>:<action> pairs for customizing warnings.

Supported filters are:
* any          - matches all warnings
* id=<integer> - matches warnings with the integer id
* src=<glob>   - matches warnings where <glob> matches the warning
                 source file

id and src filters can be combined with &.

Supported actions are:
* :s - suppress the warning
* :w - report the warning as a warning (default behavior)
* :e - error on the warning

For example, the new Vec dynamic width matching warning can be
suppressed for source files in src/main/scala while all other warnings
elevated to errors with:
  --warn-conf "id=4&src=src/main/scala/**:s,any:e"

The is also --warn-conf-file which works similarly to --warn-conf except
the <filter>:<action> pairs are newline separated in a file. # is used
for line comments.

(cherry picked from commit 8e33a68b)

# Conflicts:
#	core/src/main/scala/chisel3/Aggregate.scala
#	core/src/main/scala/chisel3/internal/package.scala
#	src/test/scala/chiselTests/ConstSpec.scala
#	src/test/scala/chiselTests/ProbeSpec.scala
parent 1de70de5
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment