Skip to content

RUM-10120: Better project-type dependency resolution for Detekt custom rules execution#2670

Merged
0xnm merged 1 commit into
developfrom
nogorodnikov/better-projects-dependency-resolution-for-detekt
May 27, 2025
Merged

RUM-10120: Better project-type dependency resolution for Detekt custom rules execution#2670
0xnm merged 1 commit into
developfrom
nogorodnikov/better-projects-dependency-resolution-for-detekt

Conversation

@0xnm

@0xnm 0xnm commented May 23, 2025

Copy link
Copy Markdown
Member

What does this PR do?

I noticed that during custom Detekt rules job execution there were some warnings regarding the types that cannot be resolved.

This PR removes (mostly) the need to specify project dependencies for Detekt run, although there is a pitfall: api configuration cannot be resolved, so we cannot know transitive project dependencies. Maybe this can be solved with detached configuration, but for now let's just specify most common modules :dd-sdk-android-core and :dd-sdk-android-internal by default for everything.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm
0xnm marked this pull request as ready for review May 23, 2025 15:47
@0xnm
0xnm requested review from a team as code owners May 23, 2025 15:47
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 69.96%. Comparing base (5376af1) to head (e5fe60b).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2670      +/-   ##
===========================================
+ Coverage    69.95%   69.96%   +0.01%     
===========================================
  Files          820      820              
  Lines        30657    30657              
  Branches      5162     5162              
===========================================
+ Hits         21445    21448       +3     
- Misses        7769     7773       +4     
+ Partials      1443     1436       -7     

see 37 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@satween satween left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, although it would be great to have some linked JIRA ticket with more details ( like warnings examples) in case of any troubles in a future.

Also we probably need to add some information somewhere that when new module is being added developer should revise DetectCostomConfig.kt file and check if he need to adjust logic that adds dependencies. Such internal changes is not frequent but on the other hand it's tricky to find it

@0xnm 0xnm changed the title Better project-type dependency resolution for Detekt custom rules execution RUM-10120: Better project-type dependency resolution for Detekt custom rules execution May 26, 2025
@0xnm

0xnm commented May 26, 2025

Copy link
Copy Markdown
Member Author

@satween I linked a Jira ticket. Not sure where info about new module setup should be added.

@0xnm
0xnm merged commit 56416bc into develop May 27, 2025
@0xnm
0xnm deleted the nogorodnikov/better-projects-dependency-resolution-for-detekt branch May 27, 2025 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants