-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Dart: ignore internal warning related to visibleForTesting usage (#1644)
----- Motivation ----- In order to allow users to mock static functions in classes the 'prototype' approach was implemented in the past. It uses prototype class to redirect static function calls. A class with '$Impl' suffix is created as a prototype. It is annotated as 'visibleForTesting' and exported from the library. The user may provide its own implementation in tests and this way redirect the calls to the mock (after setting it as prototype). Sadly, when a class is derived from the class, which has static methods, then its '$Impl' derives from the '$Impl' of base class. This leads to linter warnings: 'invalid_use_of_visible_for_testing_member'. ----- Implemented solution ----- This change adds a comment, which disables linter warnings for derived '$Impl' classes to remove the mentioned warnings from the generated code. Signed-off-by: Patryk Wrobel <183546751+pwrobeldev@users.noreply.github.com>
- Loading branch information
1 parent
ec4d3de
commit 2528ae3
Showing
6 changed files
with
7 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters