-
Notifications
You must be signed in to change notification settings - Fork 4
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
ui5lint fails with "Unable to find a UI5 Project" #43
Comments
Other than tools like ESLint, UI5 linter tries to get an understanding of your project's structure in order to resolve dependencies between modules. For that it takes a guess based on the directory structure. For example it expects a top-level directory "webapp" for applications or a "src" directory for libraries. It looks like in your case it fails to find either. Actually your project structure seems to be quite different from today's recommendations, so I'm not sure UI5 linter would ever be able to infer the correct runtime paths. You could create a UI5 Tooling ui5.yaml file in the directory that contains "zsavis", configure it as an application, and set the path mapping to However, you might end up scanning |
Hi @RandomByte , thanks for the quick reply, and thanks for thinking along! I added the ui5.yaml file and I can now get it to work. But, like you mentioned, it also scans the node_modules directory. It certainly would be great if it would be possible to exclude certain dirs. Perhaps it would be possible to create a new command line parameter for that? In fact, since I'm only using the ui5.yaml file to tell the linter what dir to use, would it not also be possible to get a command line parameter to tell the linter what directory to scan? It would make the linter much more widely applicable. The argument that the directory structure does not conform to recommendations is not so strong in my opinion, since recommendations change over the years, plus, recommendations are just that - recommendations. |
A functionality to exclude paths is already planned. For this initial release, we focused on projects that already use UI5 Tooling. Since those projects will always have a ui5.yaml, UI5 linter can re-use this configuration and offer an experience where no further configuration is necessary. As a fallback, we take an educated guesses based on the project's directory structure as described in my last comment. Without an understanding of the project's structure, we can't derive the runtime paths of each resource and might not be able to analyze all dependencies within the resources properly. We'll have to investigate the actual impact for project's like yours though. In any case I would recommend that your project starts using UI5 Tooling to be able to build an optimized version for deployment. |
Cool, thanks!
I get your point but there was a time when the recommendation was to stuff everything in resourceroots in the ui5 bootstrap script tag. I'm just saying, recommendations change, not all projects can keep up with whatever recommendations happen to be in fashion now, while it certainly is useful to lint regardless.
Let's not bicker about it. You built a cool tool and I love to use it. I'm just giving feedback from my pov. |
Expected Behavior
I ran ui5lint and expected a code quality report.
Current Behavior
Running ui5lint failed with the following error: "Unable to find a UI5 Project"
Steps to Reproduce the Issue
See above
Context
Log Output / Stack Trace
The text was updated successfully, but these errors were encountered: