DataDog / datadog-static-analyzer

Datadog Static Analyzer
https://docs.datadoghq.com/static_analysis/
Apache License 2.0
100 stars 13 forks source link

Use `Result` for `process_analysis_request`. #554

Open jasonforal opened 2 weeks ago

jasonforal commented 2 weeks ago

What problem are you trying to solve?

I'm going to be adding optional support for caching within process_analysis_request, and part of this will introduce control flow that is much more readable using the idiomatic ? operator. It's a good time to clean this function up a bit.

What is your solution?

Refactor process_analysis_request to use a Result.

This is a code cleanup. The serialized response remains the exact same.

Alternatives considered

What the reviewer should know