-
Notifications
You must be signed in to change notification settings - Fork 2.5k
fix(gradle): exclude private class for atomized test #31325
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
View your CI Pipeline Execution ↗ for commit e457df8.
☁️ Nx Cloud last updated this comment at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adjusts the logic for determining the test class name by excluding private classes and ensures only files with essential test annotations are processed. It also bumps the project version in the Gradle build file.
- Excludes private classes from being considered for test naming by updating the regex.
- Adds a check for essential test annotations to reduce false positives.
- Updates the version from 0.1.0 to 0.1.1 in build.gradle.kts.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
packages/gradle/project-graph/src/main/kotlin/dev/nx/gradle/utils/CiTargetsUtils.kt | Updates class name extraction to skip private classes and only process files with key test annotations |
packages/gradle/project-graph/build.gradle.kts | Bumps the project version |
packages/gradle/project-graph/src/main/kotlin/dev/nx/gradle/utils/CiTargetsUtils.kt
Outdated
Show resolved
Hide resolved
8a27e38
to
d9c9a13
Compare
packages/gradle/project-graph/src/main/kotlin/dev/nx/gradle/utils/CiTargetsUtils.kt
Show resolved
Hide resolved
d9c9a13
to
e457df8
Compare
previousLine = trimmed | ||
continue | ||
} | ||
val isNested = classStack.isNotEmpty() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable isNested
is declared but not used in this function. Consider removing this unused variable to improve code clarity, or incorporate it into the logic if it was intended to be part of the decision-making process.
Spotted by Diamond
Is this helpful? React 👍 or 👎 to let us know.
Current Behavior
when there are multiple classes in a test file, it currently get the first class name in a file through regex and ignore the rest
Expected Behavior
should ignore all private class name in a file
Related Issue(s)
Fixes #