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(deps): fix sonar issues #2127

Merged
merged 3 commits into from
Jul 3, 2024
Merged

fix(deps): fix sonar issues #2127

merged 3 commits into from
Jul 3, 2024

Conversation

Tyagi-Sunny
Copy link
Contributor

@Tyagi-Sunny Tyagi-Sunny commented Jul 2, 2024

fix sonar issues

2126

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #2126

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Intermediate change (work in progress)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Checklist:

  • Performed a self-review of my own code
  • npm test passes on your machine
  • New tests added or existing tests modified to cover all changes
  • Code conforms with the style guide
  • API Documentation in code was updated
  • Any dependent changes have been merged and published in downstream modules

fix sonar issues

2126
@Tyagi-Sunny Tyagi-Sunny requested a review from a team as a code owner July 2, 2024 12:13
remove sonar issues

2126
remove sonar issues

2126
Copy link

sonarcloud bot commented Jul 2, 2024

packages/cli/src/generators/cdk/index.ts Show resolved Hide resolved
Comment on lines +198 to 209
if (this.options.applicationClassName && this.options.relativePathToApp) {
let appImport = '';

let appImport = '';
const isDefaultExport = await this._isDefaultExport(
this.options.applicationClassName,
this.options.relativePathToApp,
);

const isDefaultExport = await this._isDefaultExport(
this.options.applicationClassName!,
this.options.relativePathToApp!,
);
const appImportPath = this._getAppImportPath(
this.options.relativePathToApp,
);

Copy link
Contributor

Choose a reason for hiding this comment

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

why using an if else block

Copy link
Contributor Author

Choose a reason for hiding this comment

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

type of this.options.applicationClassName is string | undefined, but _isDefaultExport require arguement to be string only

@yeshamavani yeshamavani merged commit f226bc7 into master Jul 3, 2024
5 checks passed
@yeshamavani yeshamavani deleted the gh-2126 branch July 3, 2024 05:53
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.

Fix Sonar Issues
2 participants