schemacrawler / SchemaCrawler

Free database schema discovery and comprehension tool
http://www.schemacrawler.com/
Other
1.62k stars 199 forks source link

The default linter severity should be used when severity is not defined in linter config file #34

Closed mbarre closed 8 years ago

mbarre commented 8 years ago

Hi Sualeh,

When we use xml config file without specifying the linter severity, MEDIUM severity is used instead of the default linter severity.

Ex:

public class LinterTableWithNoPrimaryKey extends BaseLinter {
    public LinterTableWithNoPrimaryKey(){
        setSeverity(LintSeverity.high);
    }
 ...
}

Here default is high.

If I use it in config file without specify the severity

<linter id="io.github.mbarre.schemacrawler.tool.linter.LinterTableWithNoPrimaryKey">
        <run>true</run>
        <table-exclusion-pattern><![CDATA[.*databasechangelog*]]></table-exclusion-pattern>
    </linter>

It will be report as lint with MEDIUM severity instead of HIGH.

It would be nice if the default linter severity were used when not defined in config file.

What do you think ?

mbarre commented 8 years ago

Thanks Sualeh ! :+1: