Skip to content

Specifications with multiple category/ignore/file in a row #38

@troycomi

Description

@troycomi

Using a job specification with multiple categories, ignores, or files in a row can lead to ambiguous parsing/matches.

Specifically if you had a command like

cmd file1 option1 option2 file2

and a specification like

cmd {file1} {ignore} {file2}

It would currently match the ignore to option1 and the file2 to option2 file2. You could use the raw record command to do your own parsing or add another {ignore} to match the second option. I was thinking we should detect when we have something like } { in the spec, but it could be any character really...

My thoughts:

  • Issue Dry run job parsing #37 could help if the user decides to test a specification/command combination
  • Maybe detect if a space is in a category or file and warn the user? We currently don't capture ignore matches so that will be harder to use.
  • Let the user overwrite the regex to match. Will need to think on the syntax, but something like {file2|[^ ]+} would solve the above. Combined with wrapping in quotes or other delimiters this may be easiest.

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