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

feat(linter): Extend project initialization fallbacks #446

Merged
merged 1 commit into from
Dec 17, 2024

Conversation

RandomByte
Copy link
Member

@RandomByte RandomByte commented Dec 13, 2024

Enhance compatibility for legacy UI5 projects that do not include a
ui5.yaml and do not use current best practice directory structures like
'webapp' for apps and 'src'/'test' for libraries.

In addition to those directories we now also check and eventually use
the following directories:

Applications:

  • src/main/webapp
  • WebContent

Libraries:

  • src/main/jslib (+ src/test/jslib)
  • src/main/uilib (+ src/test/uilib)
  • src/main/js (+ src/test/js)

} else if (await dirExists(path.join(rootDir, "WebContent"))) {
// Legacy app with WebContent folder
rootConfiguration = createProjectConfig("application", "WebContent");
} else if (await dirExists(path.join(rootDir, "src", "main", "jslib"))) {
Copy link
Member

@codeworrior codeworrior Dec 13, 2024

Choose a reason for hiding this comment

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

In the "big set", I found one project with src/main/js/ (AP-FIORI-CORE/nw.core.ushell_abap), it's not correctly handled by the logic that I've shared.

src/main/jslib, src/main/uilib don't occur in the "big set", but in SAPUI5 contributor libs.

For WebContent, I couldn't find an example, I guess this structure was used by very old tools and might occur in BSP repos only, not on GitHub.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks. I added src/main/js as well as main/webapp which I spotted in severall apps

@RandomByte RandomByte force-pushed the enhance-project-path-fallbacks branch 3 times, most recently from 813c924 to 344c61b Compare December 13, 2024 13:57
@RandomByte RandomByte requested a review from a team December 13, 2024 14:22
d3xter666
d3xter666 previously approved these changes Dec 16, 2024
Copy link
Contributor

@d3xter666 d3xter666 left a comment

Choose a reason for hiding this comment

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

LGTM

Enhance compatibility for legacy UI5 projects that do not include a
ui5.yaml and do not use current best practice directory structures like
'webapp' for apps and 'src'/'test' for libraries.

In addition to those directories we now also check and eventually use
the following directories:

Applications:
* src/main/webapp
* WebContent

Libraries:
* src/main/jslib (+ src/test/jslib)
* src/main/uilib (+ src/test/uilib)
* src/main/js (+ src/test/js)
@RandomByte RandomByte force-pushed the enhance-project-path-fallbacks branch 2 times, most recently from a8f7f63 to a5c05b5 Compare December 16, 2024 15:10
@RandomByte RandomByte merged commit f9b0f96 into main Dec 17, 2024
13 checks passed
@RandomByte RandomByte deleted the enhance-project-path-fallbacks branch December 17, 2024 13:22
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.

4 participants