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

SCANNPM-2 Detect Platform #110

Merged

Conversation

lucas-paulger-sonarsource

No description provided.

Comment on lines +22 to +24
preset: 'ts-jest',
testEnvironment: 'node',
collectCoverageFrom: ['src/**/*.{js,ts}'],

Choose a reason for hiding this comment

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

added support for ts, but I think this won't work with the js tests that exist. so need to cleanup and make sure we are left with no js tests 😅

Comment on lines +26 to +28
log(LogLevel.DEBUG, 'Finding platform info');
const platformInfo = getPlatformInfo();
log(LogLevel.INFO, 'Platform: ', platformInfo);

Choose a reason for hiding this comment

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

I need to conditionally skip this with the presence of sonar.scanner.skipArchDetection

@7PH let me know if you have any process or suggestion on how we want to do this 🙇🏻

Copy link
Member

Choose a reason for hiding this comment

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

After this PR you'll get the properties object available right before these lines, so we'll be able to use the object to decide whether to detect or not

Copy link
Member

@7PH 7PH left a comment

Choose a reason for hiding this comment

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

Looks good to me 🚀 Just 1 potential concern when looking at the platform sanitization

src/logging.ts Outdated Show resolved Hide resolved
test/unit/platform.test.ts Outdated Show resolved Hide resolved
src/platform.ts Outdated Show resolved Hide resolved
src/platform.ts Outdated Show resolved Hide resolved
@7PH 7PH self-requested a review April 16, 2024 09:06
Copy link
Member

@7PH 7PH left a comment

Choose a reason for hiding this comment

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

Sounds good, 1 NP, feel free to ignore 👍

src/types.ts Show resolved Hide resolved
src/platform.ts Outdated Show resolved Hide resolved
@lucas-paulger-sonarsource lucas-paulger-sonarsource merged commit d8fc335 into feature/MMF-3712 Apr 16, 2024
0 of 4 checks passed
@lucas-paulger-sonarsource lucas-paulger-sonarsource deleted the feature/lp/add-platform-check branch April 16, 2024 12:02
7PH pushed a commit that referenced this pull request May 3, 2024
7PH pushed a commit that referenced this pull request May 3, 2024
lucas-paulger-sonarsource added a commit that referenced this pull request May 31, 2024
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.

None yet

2 participants