salesforce / salesforce/rules_spring
Provide a check_deps_maxcount enforcement and attribute
Nobody has claimed this yet.
- Dominant language
- Starlark
- Stars
- 257
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
We have found internally that the springboot rule is a good enforcement chokepoint for catching errors in the dependency graph. the dupe class checker gets a lot of mileage and has caught a number of mistakes for us.
Another check we would like to have is fail if the count of deps exceeds a certain threshold (configurable in the workspace as per #78). The reason is we have seen cases where the service owner did not realize they were bringing in a massive graph of dependencies.
A specific case was when a service owner added a dependency on a certain SDK (a single dependency) not realizing that the SDK transitively brought in over 125 other SDK dependencies to support many APIs not needed by the service. They could have instead just brought in single, focused, SDK dependency instead.
We will need to pick a default value, which is overridable by attribute. We will decide on that value empirically using our internal collection of services, which provide a good sample.
springboot(
...
check_deps_maxcount = 150,
)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the springboot rule entry point and review the workspace configuration approach referenced in #78. Trace how the dependency graph is available to the rule, then define the enforcement boundary and configurable attribute behavior. Done means builds fail when the dependency count exceeds the selected limit, while the workspace can override the default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- spring-boot
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100