DataDog / datadog-static-analyzer

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

feat(config): preserve comments in the static analysis configuration file - IDE-2599 #472

Closed robertohuertasm closed 2 months ago

robertohuertasm commented 2 months ago

What problem are you trying to solve?

The main problem is that the comments of the configuration file are removed after modification due to the deserialization and serialization process. Some users have complained about it.

What is your solution?

Added support for comment preservation and pretty formatting.

Alternatives considered

What the reviewer should know

The last commit fixes some clippy warnings that were triggering when committing or pushing (via cargo-husky). I had to touch some files outside the ide folder. For some reason, we're using -D warnings locally but not in the CI. I didn't want to modify any of this but I guess it would be nice to reconcile this difference at some point.

https://github.com/user-attachments/assets/1e42b2ee-5b10-4435-a0ea-1c73580178bc

IDE-2599