Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate scanner plugins to new plugin API #9837

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

mnonnenmacher
Copy link
Member

Not ready for review, created to get an overview of test results.

"fast, accurate, and to support a wide variety of license texts.",
factory = ScannerWrapperFactory::class
)
class Askalono(

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Class "Askalono" is never used
"are under.",
factory = ScannerWrapperFactory::class
)
class BoyterLc(

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Class "BoyterLc" is never used
description = "Licensee is a command line tool to detect licenses in a given project.",
factory = ScannerWrapperFactory::class
)
class Licensee(

Check warning

Code scanning / QDJVMC

Unused symbol Warning

Class "Licensee" is never used

data class ScanCodeConfig(
/**
* Command line options that modify the result. These are added to the [ScannerDetails] when looking up results from
* a [ScanStorage]. Defaults to [ScanCodeConfig.DEFAULT_COMMAND_LINE_OPTIONS].

Check warning

Code scanning / QDJVMC

Unresolved reference in KDoc Warning

Cannot resolve symbol 'DEFAULT_COMMAND_LINE_OPTIONS'
Copy link

codecov bot commented Jan 26, 2025

Codecov Report

Attention: Patch coverage is 75.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.17%. Comparing base (50435a4) to head (481b5d0).

Files with missing lines Patch % Lines
.../src/main/kotlin/storages/ClearlyDefinedStorage.kt 75.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #9837      +/-   ##
============================================
- Coverage     68.21%   68.17%   -0.04%     
  Complexity     1293     1293              
============================================
  Files           250      250              
  Lines          8849     8849              
  Branches        920      920              
============================================
- Hits           6036     6033       -3     
- Misses         2424     2428       +4     
+ Partials        389      388       -1     
Flag Coverage Δ
funTest-non-docker 33.32% <75.00%> (-0.06%) ⬇️
test-ubuntu-24.04 35.98% <75.00%> (ø)
test-windows-2022 35.96% <75.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Refactor scanner plugins to not inherit from `CommandLineTool` and move
the `CommandLineTool` implementations to separate objects. Also rename
`CommandLinePathScannerWrapper` to `LocalPathScannerWrapper`.

This provides better separation of concerns and helps with the upcoming
migration of scanner plugins to the new plugin API, because with that
the scanner plugins will not have empty constructors anymore which are
required by the `RequirementsCommand` to list required command line
tools.

Signed-off-by: Martin Nonnenmacher <[email protected]>
The code has become obsolete because since 3cfe66e the VCS plugins do
not implement `CommandLineTool` anymore.

Signed-off-by: Martin Nonnenmacher <[email protected]>
Migrate the `ScannerWrapper` plugins to the new plugin API.

Signed-off-by: Martin Nonnenmacher <[email protected]>
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.

1 participant