Skip to content

Feature request: Autocorrection for Credo.Check.Readability.OnePipePerLine #103

@eksperimental

Description

@eksperimental

Reference: https://hexdocs.pm/credo/Credo.Check.Readability.OnePipePerLine.html

┃       Don't use multiple pipes (|>) in the same line.
┃       Each function in the pipe should be in it's own line.

┃           # preferred

┃           foo
┃           |> bar()
┃           |> baz()

┃           # NOT preferred

┃           foo |> bar() |> baz()

┃       The code in this example ...

┃           1 |> Integer.to_string() |> String.to_integer()

┃       ... should be refactored to look like this:

┃           1
┃           |> Integer.to_string()
┃           |> String.to_integer()

┃       Like all `Readability` issues, this one is not a technical concern.
┃       But you can improve the odds of others reading and liking your code by making
┃       it easier to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions