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

current() reformated as current () in leafref's path #302

Open
Gevrai opened this issue Mar 11, 2024 · 0 comments
Open

current() reformated as current () in leafref's path #302

Gevrai opened this issue Mar 11, 2024 · 0 comments

Comments

@Gevrai
Copy link

Gevrai commented Mar 11, 2024

Here is a quick sample model to demonstrate the issue (seen on 2.1)

module example {
  namespace "com:example";
  prefix "ex";
  
  container some-when {
    when "/foo[bar = current()/../baz]";
  }
  
  leaf some-ref {
    type leafref {
      path "/foo[bar = current()/../baz]/id";
    }
  }
}

Applying the formatter changes only the leafref's xpath (not the when's) to the following

      path "/foo[bar = current ()/../baz]/id";

While this is still a valid xpath, I think it shouldn't be reformated, or at the very least it should be coherent between both.

I've tried disabling the 'Code Style' option 'Spaces -> Custom Spacing -> Spaces before left brace' but there were no change to the behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant