Closed agi90 closed 5 years ago
I'm ok with this, but it seems like it may be a little specific to our use case. Maybe it would be better suited as a rule in some other linter?
I'm ok with this, but it seems like it may be a little specific to our use case. Maybe it would be better suited as a rule in some other linter?
Right now none of the lints actually stop you from updating the api file and ignoring them so I think it's fine to merge this as is. As discussed on slack, in the future we'll be able to select which lints run so that should ease your concern, opened Issue #34 for this.
This adds a lint to make sure that classes that only contain final fields have a protected or public constructor in the API so that external clients can mock these classes. It also checks that these classes are not final for test subclassing.