most_custom_lints 0.0.2 copy "most_custom_lints: ^0.0.2" to clipboard
most_custom_lints: ^0.0.2 copied to clipboard

Lints rules and corresponding annotations used by Dart/Flutter team at MOST.

most_custom_lints

pub version

Custom lints that are used by MOST.

Rules #

deprecated_from_expired #

It is a common practice within technology organisations to employ short-lived feature flags in continuous integration workflows. This approach allows for the integration of untested features into the main branch, representing a form of deliberate technical debt designed to facilitate smoother development flows. While the adoption of short-lived feature flags is beneficial, it often leads to challenges in maintenance when these flags are not promptly cleaned up, eventually turning into a maintenance nightmare.

To address this, our annotation provides a straightforward solution to ensure timely cleanup of these feature flags. By reminding the team to remove the flags after a predetermined number of days, we not only encourage proactive management of technical debt but also enhance team communication and collaboration. This reminder serves as a nudge for the team to collectively remember and act on the cleanup, ensuring that these temporary measures do not outstay their welcome.

DO use DeprecatedFrom to raise a warning after a specified date.

GOOD:

@DeprecatedFrom(
    'Must be addressed before the Y2K',
    DeprecationDate(1999, 01, 01)
)
String getYear() => '19$_year';

use_deprecated_from #

DO use DeprecatedFrom instead of Deprecated.

Note that it intentionally does not affect @deprecated annotation.

BAD:

@Deprecated('Use `getYearNew` instead.')
String getYear() => '19$_year';
String getYearNew() => (1900 + _year).toString();

GOOD:

@DeprecatedFrom(
    'All occurences must be replaced with `getYearNew` before Y2K.',
    DeprecationDate(1999, 01, 01)
)
String getYear() => '19$_year';
String getYearNew() => (1900 + _year).toString();
5
likes
130
pub points
7%
popularity

Publisher

verified publishermost.io

Lints rules and corresponding annotations used by Dart/Flutter team at MOST.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

analyzer, analyzer_plugin, custom_lint, custom_lint_builder, meta

More

Packages that depend on most_custom_lints