mockito_analyzer_plugin 0.1.0 copy "mockito_analyzer_plugin: ^0.1.0" to clipboard
mockito_analyzer_plugin: ^0.1.0 copied to clipboard

An analyzer plugin with guard rails for using mockito

mockito_analyzer_plugin #

This package is an analyzer plugin that provides additional static analysis for usage of the mockito package.

I should add quick fixes to this plugin, but for now, there are just warnings for:

  • when an arg matcher (any, anyNamed, argThat, captureAny, captureAnyNamed, captureArgThat) is used outside of creating a stub response
  • when a named arg matcher is used as an argument for a positional parameter
  • when an unnamed arg matcher is used as an argument for a named parameter
  • when a named arg matcher is used as an argument for a named parameter with a different name
  • when a call to when is given a stub call on a non Mock instance
  • when a call to when is not followed by a stub (thenReturn, thenReturnInOrder, thenThrow, or thenAnswer)
  • when a call to verify is followed by .called(0)
0
likes
120
points
2
downloads

Publisher

unverified uploader

Weekly Downloads

An analyzer plugin with guard rails for using mockito

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

analysis_server_plugin, analyzer, analyzer_plugin, collection

More

Packages that depend on mockito_analyzer_plugin