How to set severityOverrides in lintOptions?
I would like to share what I'm doing.
Instead of set severityOverrides, you can call one method to each type of flag that you want to set.
lintOptions {
ignore "RtlEnabled", "RtlHardcoded", "RtlSymmetry" ....
warning "RtlEnabled", "RtlHardcoded", "RtlSymmetry" ....
error "RtlEnabled", "RtlHardcoded", "RtlSymmetry" ....
fatal "RtlEnabled", "RtlHardcoded", "RtlSymmetry" ....
informational "RtlEnabled", "RtlHardcoded", "RtlSymmetry" ....
}
In your case, you can do:
lintOptions {
warning "MissingTranslation"
}
I'm not sure if you can manually set severityOverrides since it is a read only property.
So, I think you really must call one of the methods above (error, fatal etc..) to override the property that you want
(Not an answer-answer, but this is what I used as an equivalent replacement when I couldn't get lintOptions.severityOverrides
to work)
Drop a lint.xml file with the same configuration at the root of the module.
<?xml version="1.0" encoding="UTF-8" ?>
<lint>
<issue id="MissingTranslation" severity="warning" />
</lint>
You also get a richer API to tune lint warnings through lint.xml
.