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

refactor(analyzer): Add a function to create dependency graph projects #9426

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sschuberth
Copy link
Member

This centralizes project creation which will ease an upcoming change.

This centralizes project creation which will ease an upcoming change.

Signed-off-by: Sebastian Schuberth <[email protected]>
Comment on lines +268 to +280
fun DependencyGraphBuilder<*>.createProject(
namespace: String,
name: String,
version: String,
definitionFile: File,
projectDir: File = definitionFile.parentFile,
authors: Set<String> = emptySet(),
homepageUrl: String = "",
declaredLicenses: Set<String> = emptySet(),
licenseOperator: SpdxOperator = SpdxOperator.AND,
vcsFromProject: VcsInfo = VcsInfo.EMPTY,
vararg vcsFallbackUrls: String
): Project {

Check warning

Code scanning / detekt

The more parameters a function has the more complex it is. Long parameter lists are often used to control complex algorithms and violate the Single Responsibility Principle. Prefer functions with short parameter lists. Warning

The function createProject(namespace: String, name: String, version: String, definitionFile: File, projectDir: File, authors: Set, homepageUrl: String, declaredLicenses: Set, licenseOperator: SpdxOperator, vcsFromProject: VcsInfo, vcsFallbackUrls: String) has too many parameters. The current threshold is set to 8.
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.

1 participant