How to prevent SQ from making Composable code worse?

Must-share information (formatted with Markdown):

  • Enterprise Edition Version 10.3 (build 82913)
  • no idea how its deployed.
  • SQ is blocking PRs using a “quality gate”
  • It’s is incorrectly or poorly flagging Composeable code, in ways that increase cognitive complexity.

How do I get it to stop flagging layout composables. It’s forcing me to make one-off private components, and increasing cognitive complexity, because it doesn’t understand Compose code.

Hey there.

A code sample would be great. :slight_smile:

Sorry, I can’t give you client code.

However, any sufficiently complex Compose UI can trigger a cognitive complexity flag or a parameter count flag on Composable layout code.

Sometimes you can make reasonable adjustments, and squeek past, but often you end up making the code more complex, simply in order to get past the gate keeper.

We can’t really help out without a thorough description of the problem, which would include an example code sample.

You can mark issues as false-positive in the UI, or disable this rule in your Quality Profile (lots of options for (other options for igorning specific rules on specific files can be found here).

I can’t give you secured client code, and we don’t have access to SQ, to mark anything as a false positive.

One thing that might help is to be able to have a different set of rules for composable code.
one set of rules for code complexity or number of params in a function is probably too simplistic.