Skip to content

Comments within the body of a just recipe should be ignored #1274

Description

@neunenak

If I have a justfile like:

some-recipe argument:
    # Here is a comment
    @echo "hello"
    # Another comment
    @echo {{argument}}

When I run it I get the output:

just some-recipe "some text"
# Here is a comment
hello
# Another comment
some text

I can make the printing of those comments go away by adding a @ in front of them, but it would be nice if just interpreted comments within a just recipe as comments and completely ignored them.

I think what might be happening here is that the comment lines are each getting echoed by just and then passed to a shell invocation, where they do absolutely nothing because sh and just have the same syntax for comments.

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