smithy-lang / smithy-language-server

A Language Server Protocol implementation for the Smithy IDL
https://smithy.io
Apache License 2.0
33 stars 19 forks source link

Avoid substring if not suffixed #133

Closed daddykotex closed 10 months ago

daddykotex commented 10 months ago

Issue #, if available:

Fixes #132

Description of changes:

Avoid the string manipulation if the shape name is not suffixed by input or ouput.

srchase commented 10 months ago

@daddykotex, would you mind adding a couple of structures with @input and @output traits at the end of this test model along with an assertion here?

daddykotex commented 10 months ago

Details of the repro in the commit msg:

https://github.com/smithy-lang/smithy-language-server/pull/133/commits/425d229e65f6a72f7d51d0dec38abf2eccd17c61