aboutcode-org / aboutcode-org/scancode-toolkit

Consider variable expansion during Package parsing

Offen
#3,025 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
new feature package scan
Vorherrschende Sprache
Python
Sterne
2.6k
Forks
791
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
5

Beschreibung

In the case of podspec manifests, sometimes the version is defined in a variable and we end up capturing the version variable name as the version value rather than the actual version value itself. For example, in the case of scanning `AmplifyPlugins.podspec`
```
#
# Be sure to run `pod spec lint AWSS3StoragePlugin.podspec' to ensure this is a
# valid spec and to remove all comments including this before submitting the spec.
#
# To learn more about Podspec attributes see https://guides.cocoapods.org/syntax/podspec.html
# To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
#

# Version definitions
$AMPLIFY_VERSION = '1.23.0'
$AMPLIFY_RELEASE_TAG = "v#{$AMPLIFY_VERSION}"

$AWS_SDK_VERSION = '2.27.0'
$OPTIMISTIC_AWS_SDK_VERSION = "~> #{$AWS_SDK_VERSION}"

Pod::Spec.new do |s|
s.name = 'AmplifyPlugins'
s.version = $AMPLIFY_VERSION
s.summary = 'Amazon Web Services Amplify for iOS.'

...
```
scancode creates a package for `AmplifyPlugins` with a version of `$AMPLIFY_VERSION`.

It would be nice to have scancode figure out what the variable is and the proper variable value as the version.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.