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

Bug: JS WrongFilePathLinter triggering in string templates #136

Closed
netux opened this issue Oct 25, 2023 · 2 comments
Closed

Bug: JS WrongFilePathLinter triggering in string templates #136

netux opened this issue Oct 25, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@netux
Copy link
Contributor

netux commented Oct 25, 2023

Describe the bug
The JS WrongFilePathLinter may trip up when trying to find the file of a class path generated dynamically using string literals.

In my case, I have the following function:

loadFragmentRelative(fragmentName) {
  return this.loadFragment({ name: `com.mycompany.myapp.view.${fragmentName}` });
}

To Reproduce
Steps to reproduce the behavior:

  1. Type the following in a Controller:
`com.mycompany.myapp.${someValue}`
  1. Run the linter
  2. WrongFilePathLinter error is triggered saying it cannot find a file under "com.mycompany.myapp.${someValue"

Expected behavior
I'd rather WrongFilePathLinter skip this error.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: macOS
  • UI5 version: SAPUI5 1.118.0
  • ui5plugin-linter version: 1.11.1 (latest in VSCodeUI5Plugin at the time of writing)

Additional context
This may also happen with normal string concatenation. E.g.:

"com.mycompany.myapp." + someValue

Project attachment
N/A. I don't think it is needed.

@netux netux added the bug Something isn't working label Oct 25, 2023
@iljapostnovs
Copy link
Owner

Fixed, please check

@iljapostnovs iljapostnovs assigned netux and unassigned iljapostnovs Nov 9, 2023
@netux
Copy link
Contributor Author

netux commented Nov 10, 2023

Solved. Thank you!

@netux netux closed this as completed Nov 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants