most_custom_lints

Last updated:

0 purchases

most_custom_lints Image
most_custom_lints Images
Add to Cart

Description:

most custom lints

most_custom_lints





Custom lints that are used by MOST.

Rules

deprecated_from_expired
use_deprecated_from



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';
copied to clipboard
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();
copied to clipboard
GOOD:
@DeprecatedFrom(
'All occurences must be replaced with `getYearNew` before Y2K.',
DeprecationDate(1999, 01, 01)
)
String getYear() => '19$_year';
String getYearNew() => (1900 + _year).toString();
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.