Skip to content

feat: add option to skip by path by project name and project type#73

Open
jmvtrinidad wants to merge 7 commits intokoliveira15:mainfrom
jmvtrinidad:skipPathProjectName
Open

feat: add option to skip by path by project name and project type#73
jmvtrinidad wants to merge 7 commits intokoliveira15:mainfrom
jmvtrinidad:skipPathProjectName

Conversation

@jmvtrinidad
Copy link

No description provided.

Copy link
Owner

@koliveira15 koliveira15 left a comment

Choose a reason for hiding this comment

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

@jmvtrinidad thanks for the contribution! Please fix & address the comments below with a passing build and I will merge

@koliveira15 koliveira15 added the enhancement New feature or request label Mar 17, 2024
@nx-cloud
Copy link

nx-cloud bot commented Mar 17, 2024

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 1bd41c0. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


✅ Successfully ran 1 target

Sent with 💌 from NxCloud.

@jmvtrinidad jmvtrinidad force-pushed the skipPathProjectName branch from 482e13e to 2938232 Compare March 18, 2024 10:33
@jmvtrinidad jmvtrinidad force-pushed the skipPathProjectName branch from 2938232 to 571f966 Compare March 18, 2024 10:41
@jmvtrinidad
Copy link
Author

Thanks for reviewing @koliveira15
Please see updated changes

) {
return true;
}
return options.skipDependencyTypes.includes(
Copy link
Owner

Choose a reason for hiding this comment

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

I tested this logic filter in my own repo, and it does not work. It needs to filter by DependencyType.static|implicit|dynamic based on the options array.

"skipDependencyTypes": ["static"]
> nx run lib-b:sonar

Included sources paths: libs/lib-a/src,libs/lib-b/src
Included lcov paths: coverage/libs/lib-a/lcov.info,coverage/libs/lib-b/lcov.info

"type": "array",
"default": []
},
"skipImplicitDeps": {
Copy link
Owner

Choose a reason for hiding this comment

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

remove

"type": "string",
"default": "300"
},
"skipDependencyTypes": {
Copy link
Owner

Choose a reason for hiding this comment

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

Please update README.md in the root of the project with these properties and remove skipImplicitDeps property from the markdown as well

)
.filter(
(project) =>
context.projectName === project.name ||
Copy link
Owner

Choose a reason for hiding this comment

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

I tested this logic filter in my own repo, and it does not work as expected

"skipProjects": ["lib-a"]
> nx run lib-b:sonar

Included sources paths: libs/lib-a/src,libs/lib-b/src
Included lcov paths: coverage/libs/lib-a/lcov.info,coverage/libs/lib-b/lcov.info

(project) =>
context.projectName === project.name ||
(options.skipPaths?.length
? options.skipPaths.some((path) => project.sourceRoot.includes(path))
Copy link
Owner

Choose a reason for hiding this comment

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

I tested this logic filter in my own repo, and it does not work as expected

"skipPaths": ["libs/lib-a/src"]
> nx run lib-b:sonar

Included sources paths: libs/lib-a/src,libs/lib-b/src
Included lcov paths: coverage/libs/lib-a/lcov.info,coverage/libs/lib-b/lcov.info

@jmvtrinidad jmvtrinidad force-pushed the skipPathProjectName branch from 0d0d528 to e4c0e10 Compare March 19, 2024 15:22
@jmvtrinidad
Copy link
Author

Thanks @koliveira15, I tested it now also with my local, the filter is now working properly

@koliveira15
Copy link
Owner

Thanks @koliveira15, I tested it now also with my local, the filter is now working properly

I have tested this locally and is still not working as expected

@devzom
Copy link

devzom commented Dec 18, 2024

@jmvtrinidad are you able to deliver this? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants