salesforce / rules_spring

Bazel rule for building Spring Boot apps as a deployable jar
BSD 3-Clause "New" or "Revised" License
224 stars 48 forks source link

Provide a 'strict_usage' mode that fails the build if deprecated features or anti-patterns are used #151

Open plaird opened 2 years ago

plaird commented 2 years ago

As we collect deprecated attributes, it would be good to allow build teams to eliminate usages of them and prevent new usages. This should be coupled with #78 to configure this mode at the workspace level. It must be False by default to not break back compat.

springboot(
    ...
    strict_usage = True,
)

I can't think of anti-patterns off-hand, but we should leave options open for what could fail the build. We should be clear that there are checks (dupeclass, max dep count, etc) which are not controlled by _strictusage.