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

Does not catch Duplicated State names #39

Open
techmag opened this issue Jul 3, 2020 · 1 comment
Open

Does not catch Duplicated State names #39

techmag opened this issue Jul 3, 2020 · 1 comment
Labels

Comments

@techmag
Copy link

techmag commented Jul 3, 2020

A duplicate state name gets past both this linter and the initial console editor.

It doesn't show as an error until you try to save in the console.

While it's a relatively trivial matter it should nonetheless be easy to catch?

More useful the longer the function is of course.

The following passes...

{
  "Comment": "Duplicate Example",
  "StartAt": "Dup Check",
  "States": {
    "Dup Check": {
      "Type": "Pass",
      "Result" : { "none" : 0 },
      "Next": "SuccessState"
    },
    "Dup Check": {
      "Type": "Pass",
      "Result" : { "none" : 0 },
      "Next": "SuccessState"
    },
    "SuccessState": {
      "Type": "Succeed"
    }
  }
}
@wong-a wong-a added the bug label Jul 8, 2020
@wong-a
Copy link
Collaborator

wong-a commented Jul 8, 2020

This is a bug. Duplicate state names aren't allowed.

From the Amazon States Language spec:

States are represented as fields of the top-level “States” object. The state name, whose length MUST BE less than or equal to 128 Unicode characters, is the field name; state names MUST be unique within the scope of the whole state machine.

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

No branches or pull requests

2 participants