Skip to content

Two string literals directly added to each other should be combined #321

@Pandapip1

Description

@Pandapip1

Description

When two string literals are directly added to one another, they should be combined into a single string literal.

Small example input

  postPatch =
    ''
      # Replace hardcoded bin install path
      substituteInPlace SerialPortConnector.pro \
        --replace-fail '/opt/$$''
    + ''
      {TARGET}/bin' "$out/bin"
    '';

Expected output

  postPatch = ''
    # Replace hardcoded bin install path
    substituteInPlace SerialPortConnector.pro \
      --replace-fail '/opt/$''${TARGET}/bin' "$out/bin"
  '';

Actual output

  postPatch = ''
    # Replace hardcoded bin install path
    substituteInPlace SerialPortConnector.pro \
      --replace-fail '/opt/$$''
  + ''
    {TARGET}/bin' "$out/bin"
  '';

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions