Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unexpected TOKEN_PAREN_OPEN in string #380

Open
jpotier opened this issue Mar 12, 2023 · 0 comments
Open

unexpected TOKEN_PAREN_OPEN in string #380

jpotier opened this issue Mar 12, 2023 · 0 comments
Labels
component | third-party dependency Third party dependency status | it is a good thing We agree it is good to implement this type | bug Something isn't working

Comments

@jpotier
Copy link

jpotier commented Mar 12, 2023

This evals correctly using nix, test.nix:

{ pkgs }:

{
  a = ''TRACKERSE+=$(echo $url | ${pkgs.gnused}/bin/sed 's/ /%20/g;s/!/%21/g;s/"/%22/g;s/#/%23/g;s/\$/%24/g;s/\&/%26/g;s/'\''\''/%27/g;s/(/%28/g;s/)/%29/g;s/\//%2F/g;s/:/%3A/g')'';
}

but alejandra chokes on it:

$ nix fmt test.nix
Checking style in 1 file using 8 threads.


Failed! 1 error found at:
- test.nix: unexpected TOKEN_PAREN_OPEN at 150..192, wanted any of [TOKEN_IDENT]

this is with alejandra-3.0.0 from nixpkgs:

    "nixpkgs": {
      "locked": {
        "lastModified": 1672791794,
        "narHash": "sha256-mqGPpGmwap0Wfsf3o2b6qHJW1w2kk/I6cGCGIU+3t6o=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "9813adc7f7c0edd738c6bdd8431439688bb0cb3d",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "nixos-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    },
@kamadorueda kamadorueda added type | bug Something isn't working status | it is a good thing We agree it is good to implement this component | third-party dependency Third party dependency labels Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component | third-party dependency Third party dependency status | it is a good thing We agree it is good to implement this type | bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants