Skip to content

Buildifier shouldn't break up blocks of constants with newlines #108

Open
@jmillikin-stripe

Description

@jmillikin-stripe
UBUNTU_MAIN = "http://mirrors.kernel.org/ubuntu/pool/main/"
UBUNTU_UNIVERSE = "http://mirrors.kernel.org/ubuntu/pool/universe/"
NODEJS = "http://deb.nodesource.com/node_6.x/pool/main/"

becomes

UBUNTU_MAIN = "http://mirrors.kernel.org/ubuntu/pool/main/"

UBUNTU_UNIVERSE = "http://mirrors.kernel.org/ubuntu/pool/universe/"

NODEJS = "http://deb.nodesource.com/node_6.x/pool/main/"

This is not ideal because a BUILD file with blocks of related constants can become very "fluffy" and difficult to scan over.

Copying the gofmt logic of aligning equals signs in blocks of assignments would be nicer:

UBUNTU_MAIN     = "http://mirrors.kernel.org/ubuntu/pool/main/"
UBUNTU_UNIVERSE = "http://mirrors.kernel.org/ubuntu/pool/universe/"
NODEJS          = "http://deb.nodesource.com/node_6.x/pool/main/"

Or, alternatively, just don't add newlines.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions