Skip to content

Invalid LS response #101

Closed
Closed
@akurtakov

Description

@akurtakov

Relevant Request and replies are:

LSP4E to org.eclipse.shelled.ls:{"jsonrpc":"2.0","id":"4","method":"textDocument/documentSymbol","params":{"textDocument":{"uri":"file:///home/akurtakov/work/runtime-EclipseApplication/test/test.sh"}}}
org.eclipse.shelled.ls to LSP4E:{"jsonrpc":"2.0","id":"4","result":[{"name":"add_a_user","kind":12,"location":{"uri":"file:///home/akurtakov/work/runtime-EclipseApplication/test/test.sh","range":{"start":{"line":3,"character":0},"end":{"line":14,"character":1}}}},{"name":"USER","location":{"uri":"file:///home/akurtakov/work/runtime-EclipseApplication/test/test.sh","range":{"start":{"line":5,"character":2},"end":{"line":5,"character":9}}},"containerName":"add_a_user"},{"name":"PASSWORD","location":{"uri":"file:///home/akurtakov/work/runtime-EclipseApplication/test/test.sh","range":{"start":{"line":6,"character":2},"end":{"line":6,"character":13}}},"containerName":"add_a_user"},{"name":"COMMENTS","location":{"uri":"file:///home/akurtakov/work/runtime-EclipseApplication/test/test.sh","range":{"start":{"line":9,"character":2},"end":{"line":9,"character":13}}},"containerName":"add_a_user"}]}

the file for which it happens is:

#!/bin/sh
# A simple script with a function...

add_a_user()
{
  USER=$1
  PASSWORD=$2
  shift; shift;
  # Having shifted twice, the rest is now comments ...
  COMMENTS=$@
  echo "Adding user $USER ..."
  echo useradd -c "$COMMENTS" $USER
  echo passwd $USER $PASSWORD
  echo "Added user $USER ($COMMENTS) with pass $PASSWORD"
}

###
# Main body of script starts here
###
echo "Start of script..."
add_a_user bob letmein Bob Holness the presenter
add_a_user fred badpassword Fred Durst the singer
add_a_user bilko worsepassword Sgt. Bilko the role model
echo "End of script..."

The issue is that for USER, PASSWORD and COMMENTS variables "kind" attribute is missing but it's mandatory according to spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions