Skip to content

Question about Review.Rule.newModuleRuleSchemaUsingContextCreator #166

@lue-bird

Description

@lue-bird

Review.Rule.newModuleRuleSchema allows adding for example a withElmJsonModuleVisitor.
However, newModuleRuleSchemaUsingContextCreator cannot be used with that visitor because the resulting schema doesn't have the phantom field canCollectProjectData : ().

As far as I can see, it is not possible to access the Elm.Project.Project/ElmJsonKey using a ContextCreator or any other method.

First, is this intentional somehow? Converting it to a project rule seems easy enough (and the result is probably nicer anyway).
And if not, should we add the phantom field in v3? Or would it be nicer to introduce something like withElmJson etc for the ContextCreator?

Edit: I can see that the current implementation of fromModuleRuleSchema would not allow the first suggested change easily. I'll try to poke a bit to see if this is necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions