solo_lints 0.1.5
solo_lints: ^0.1.5 copied to clipboard
Analyzer plugin for solo and flutter_solo: a job in its own queue, a shared key, a needless ignoreFailure(), and the rules of async_job_lints for the core.
0.1.5 #
- The five rules of the core,
ctx_in_cleanup,release_on_the_call,catch_without_check,sync_fake_asyncandbare_await, come from the new packageasync_job_lints, for code on async_job alone. This plugin includes them under the same names, sodiagnostics:and// ignore:stay as they are. Their changes are listed in the changelog ofasync_job_lints. The ids of the quick fixes ofrelease_on_the_callandcatch_without_checkbegin withasync_job_lints.fix.instead ofsolo_lints.fix., so an editor binding that names an old id needs the new one. Name one of the two plugins, not both. - The README describes the package as the plugin for solo and flutter_solo, and
the rules of the core link to the README of
async_job_lints. - The package has an example: a recorder with three mistakes, the lines the plugin reports and the same job fixed.
pubspec.yamlnames the documentation site, and pub.dev links to it.- The blocks of the README ask for this version.
0.1.4 #
- The tests run against async_job and solo 1.0.0; the rules have not changed.
- The README no longer names
waitamong the members of the context, since async_job 1.0 has noctx.wait. Its Versions section says that the rules still knowwait, the name ofabandonablebefore 1.0. - The blocks of the README ask for this version.
0.1.3 #
- The README links to the page of the package on the documentation site.
- The README says that
dart analyzeshows the diagnostics of the plugin on the root of the package or on single files, but not on a folder below the root, such aslib.
0.1.2 #
- The README no longer says that
flutter analyzereports the diagnostics of the plugin: from Flutter 3.44 on it shows none of them, and a Flutter package runsdart analyzefor the plugin.
0.1.1 #
bare_await, a lint: anawaitin a job body that waits past the context, so a cancellation of the job does not end the wait, and anawait forthat reads a stream pastctx.each. It is quiet in cleanup, in the actions ofjoinanduncancellable, inunattendedwork, infinally, in a body made withcancellable: falseand on a release right afterctx.disown.- The README says how to raise a rule to a warning, that
dart fixdoes not apply the quick fixes of a plugin, and that Dart 3.12 prints each diagnostic of the analyzer twice in a package that names a plugin.
0.1.0 #
Initial release. An analyzer plugin for code built on async_job and solo,
for Dart 3.10 and later.
ctx_in_cleanup, a warning: a waiting member of the context called in cleanup, where it throwsStateError.release_on_the_call, a warning: a release registered on the line under the call that brings the resource, where a cancellation loses it.catch_without_check, a lint: a broad catch in a body that acts before asking the job whether it was cancelled.sync_fake_async, a warning: anasynccallback offakeAsyncorFakeAsync.run.await_own_queue, a warning: a job of aSolocontroller that waits for a job queued on the same controller, or for itsclose()orcancelAll().key_per_request, a lint: aPolicy.droppablejob whose key reads no argument while its body does, so a later caller gets the result of the first.ignore_failure_hides_bugs, a lint:ignoreFailure()on a job that names its expected errors inisExpectedError, which hides the bugs the predicate lets through.- Quick fixes for
release_on_the_call(the release moves intodispose:ordiscard:of the call),catch_without_check(ctx.check();becomes the first line of the catch) andkey_per_request(the arguments the body reads go into the key).