Hi everyone, Looking to integrate detekt in our pr...
# detekt
t
Hi everyone, Looking to integrate detekt in our pre-commit hook, but concerned about large legacy files that are quite large (over 1,000 lines) and often contain many code violations. Is there a way to configure detekt to only analyze the actual code changes (diffs) within a file, rather than the entire file? This would help us focus on fixing issues in the newly modified parts of the code and avoid getting bogged down by legacy violations. #detekt
e
It sounds like you want a baseline. Run
detektBaseline
(
detektBaselineMain
if you want type resolution). This should give you a baseline file that detekt will use to ignore legacy violations when you run
detekt
/
detektMain
.
1