Sitelet https://github.com/casey/just/issues/3702
Skip to content

just --fmt should preserve single-value attribute syntax #3702

Description

@yuan-y-chang

Summary

Please consider adding a formatter option that controls how single-value attributes are rendered by just --fmt.

At present, just --fmt unconditionally converts colon-separated single-value attributes to the function-style syntax. For example:

[doc: "doc"]
[group: "group"]

is formatted as:

[doc("doc")]
[group("group")]

Proposed behavior

A formatter option could allow users to select the preferred syntax for single-value attributes. For example, users could choose between:

[doc: "doc"]

and:

[doc("doc")]

The exact option name and syntax are open for discussion. Possible approaches include a command-line option, a configuration setting, or a formatter-specific setting in the justfile.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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