masamune_lints 3.4.0 copy "masamune_lints: ^3.4.0" to clipboard
masamune_lints: ^3.4.0 copied to clipboard

Package that defines lint rules necessary for use with the Masamune framework.

Masamune logo

Masamune Lints

Follow on GitHub Follow on X Follow on YouTube Maintained with Melos

GitHub Sponsor


[GitHub] | [YouTube] | [Packages] | [X] | [LinkedIn] | [mathru.net]


Plug-in packages that add functionality to the Masamune Framework.

For more information about Masamune Framework, please click here.

https://pub.dev/packages/masamune

Error handling rules #

Masamune distinguishes expected and unexpected errors by catch syntax.

try {
  await operation();
} on ValidationException catch (e) {
  handleValidationError(e);
} catch (e, stackTrace) {
  await appLogger.error(e, stackTrace);
  handleUnexpectedError();
}
  • masamune_expected_error_should_have_unexpected_catch requires a final untyped catch when a try statement has typed catches for expected errors.
  • masamune_caught_error_should_report requires an untyped catch to report the same caught error and stack trace with appLogger.error, unless it propagates the error with rethrow or throw.
  • Typed on XxxException catch clauses declare expected errors and do not require incident reporting.

GitHub Sponsors #

Sponsors are always welcome. Thank you for your support!

https://github.com/sponsors/mathrunet

1
likes
130
points
537
downloads

Documentation

API reference

Publisher

verified publishermathru.net

Weekly Downloads

Package that defines lint rules necessary for use with the Masamune framework.

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

analyzer, analyzer_plugin, custom_lint, custom_lint_builder, katana

More

Packages that depend on masamune_lints