Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@3flex
Copy link
Member

@3flex 3flex commented Sep 22, 2024

Move common detekt Gradle task parameters into interfaces.

There are lots of ways to do this of course, so I'm open to feedback & suggestions on improvements on structure & naming.

Quick overview:

  • DetektBase - these are detekt-specific configuration parameters. Anything used to configure detekt sits here.
  • CommonCompilationArgs - common compiler args that apply to all compilations, including non-JVM targets. Separating from JvmCompilationArgs means we can add JsCompilationArgs and others in future.
  • JvmCompilationArgs - JVM-specific compiler args
  • DetektCliTool - it's unlikely we switch to tooling API for DGP 2.0.0 but separating this interface may make it easier to make the switch in future.

This will evolve as there's more I'd like to do to separate concerns in future PRs:

  1. Add an args parameter to DetektCliTool and use common functions to launch the application using either worker API or the current default method.
  2. Add lots of KDoc
  3. Create separate interfaces & types to cleanly separate source set analysis tasks from compilation analysis tasks. We don't need things like JVM target, classpath etc. when analysing source sets.

It's enough though to fix #5940.

@3flex 3flex added this to the 2.0.0 milestone Sep 22, 2024
@detekt-ci
Copy link
Collaborator

Warnings
⚠️ It looks like this PR contains functional changes without a corresponding test.

Generated by 🚫 dangerJS against 07aa359

@codecov
Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.51%. Comparing base (e6fd00a) to head (07aa359).
Report is 359 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #7662   +/-   ##
=========================================
  Coverage     84.51%   84.51%           
  Complexity     4136     4136           
=========================================
  Files           569      569           
  Lines         11879    11879           
  Branches       2465     2465           
=========================================
  Hits          10039    10039           
  Misses          595      595           
  Partials       1245     1245           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@3flex 3flex marked this pull request as draft September 29, 2024 00:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature request: Make Detekt and DetektCreateBaselineTask implement a common interface

2 participants