Reports likely missing calls to a subscriptions function.
config =
[ NoMissingSubscriptionsCall.rule
]
Fail
import SomeModule
update msg model =
case msg of
UsedMsg subMsg ->
SomeModule.update subMsg model.used
subscriptions model =
-- We used `SomeModule.update` but not `SomeModule.subscriptions`
Sub.none
This won't fail if SomeModule does not define a subscriptions function.
Success
import SomeModule
update msg model =
case msg of
UsedMsg subMsg ->
SomeModule.update subMsg model.used
subscriptions model =
SomeModule.subscriptions
Try it out
You can try this rule out by running the following command:
Reports likely missing calls to a
subscriptionsfunction.Fail
This won't fail if
SomeModuledoes not define asubscriptionsfunction.Success
Try it out
You can try this rule out by running the following command: