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] ui5 init: Improve error message #661

Merged
merged 2 commits into from
Oct 30, 2023
Merged

Conversation

matz3
Copy link
Member

@matz3 matz3 commented Oct 26, 2023

@matz3 matz3 requested review from a team and KlattG October 26, 2023 14:16
@coveralls
Copy link

Coverage Status

coverage: 96.726% (+0.01%) from 96.716% when pulling b00c8ee on improve-init-error-message into 08ed2a6 on main.

lib/init/init.js Outdated
@@ -49,6 +49,9 @@ function getProjectType(hasWebapp, hasSrc, hasTest) {
let message = `Could not detect project type: ${errorReason}`;
message += "Applications should only have a 'webapp' folder.\n";
message += "Libraries should only have a 'src' and (optional) 'test' folder.";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message += "Libraries should only have a 'src' and (optional) 'test' folder.";
message += "Libraries should only have an 'src' and (optional) 'test' folder.";

lib/init/init.js Outdated
@@ -49,6 +49,9 @@ function getProjectType(hasWebapp, hasSrc, hasTest) {
let message = `Could not detect project type: ${errorReason}`;
message += "Applications should only have a 'webapp' folder.\n";
message += "Libraries should only have a 'src' and (optional) 'test' folder.";
message += "\n\n";
message += "In case you are about to start a new project, please refer to:\n";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
message += "In case you are about to start a new project, please refer to:\n";
message += "If you are about to start a new project, please refer to:\n";

@@ -40,49 +40,50 @@ test("Init for library", async (t) => {
});
});

const GENERAL_ERROR_MESSAGE = `Applications should only have a 'webapp' folder.
Libraries should only have a 'src' and (optional) 'test' folder.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Libraries should only have a 'src' and (optional) 'test' folder.
Libraries should only have an 'src' and (optional) 'test' folder.

const GENERAL_ERROR_MESSAGE = `Applications should only have a 'webapp' folder.
Libraries should only have a 'src' and (optional) 'test' folder.

In case you are about to start a new project, please refer to:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
In case you are about to start a new project, please refer to:
If you are about to start a new project, please refer to:

@matz3 matz3 merged commit 07e68b0 into main Oct 30, 2023
17 checks passed
@matz3 matz3 deleted the improve-init-error-message branch October 30, 2023 08:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ui5 use error expecting manifest.json to already be present
4 participants