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

Fix linter on return statements #1030

Open
ChloePlanet opened this issue Aug 26, 2020 · 0 comments
Open

Fix linter on return statements #1030

ChloePlanet opened this issue Aug 26, 2020 · 0 comments
Assignees
Labels
bug P1 Medium priority

Comments

@ChloePlanet
Copy link
Contributor

Please do not post any internal, closed source snippets on this public issue tracker!

Description

These two return statements below should be failed but they didn't.

return ok <: 200
return 200 ok

Reference: https://github.com/anz-bank/sysl/blob/master/pkg/parse/tests/lint_return.sysl

Steps to Reproduce

return ok <: 200

  1. test.sysl file:
MobileApp:
  Name:
    return ok <: 200
  1. $ sysl validate --root . test.sysl -v

return 200 ok

  1. test.sysl file:
MobileApp:
  Name:
    return 200 ok
  1. $ sysl validate --root . test.sysl -v

Expected behavior

no warnings

Actual behavior

WARN[0000] lint test.sysl:3:4: 'return ok <: 200' not supported, use 'return 200' instead
WARN[0000] lint test.sysl:3:4: 'return 200 ok' not supported, use 'return 200' instead

Your Environment

$ sysl info
Build:
  Version      : DIRTY-44179172f0a84093ce0e736a420176df9ea9301a (from v0.179.0)
  Git Commit   : 44179172f0a84093ce0e736a420176df9ea9301a
  Date         : 2020-08-13T02:24:17Z
  Go Version   : go1.13 darwin/amd64
  OS           : darwin/amd64
@ChloePlanet ChloePlanet added bug P1 Medium priority labels Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug P1 Medium priority
Projects
None yet
Development

No branches or pull requests

2 participants