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

Add support for Swift package manager #3788

Merged
merged 14 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,15 @@ v33.0.0 (next next, roadmap)
of these in other summary plugins.
See https://github.com/nexB/scancode-toolkit/issues/1745

- We now support parsing the Swift manifest JSON dump and the ``Package.resolved`` file https://github.com/nexB/scancode-toolkit/issues/2657.
- Run the commands below on your local Swift project before running the scan.
- ::

swift package dump-package > Package.swift.json
- ::

swift package resolve

v32.1.0 (next, roadmap)
----------------------------

Expand Down
27 changes: 27 additions & 0 deletions docs/source/reference/available_package_parsers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ parsers in scancode-toolkit during documentation builds.
- https://r-pkgs.org/description.html
* - Debian control file - extracted layout
- ``*/control.tar.gz-extract/control``
``*/control.tar.xz-extract/control``
- ``deb``
- ``debian_control_extracted_deb``
- None
Expand Down Expand Up @@ -716,6 +717,19 @@ parsers in scancode-toolkit during documentation builds.
- ``rpm_installed_database_sqlite``
- None
- https://fedoraproject.org/wiki/Changes/Sqlite_Rpmdb
* - RPM mariner distroless package manifest
- ``*var/lib/rpmmanifest/container-manifest-2``
- ``rpm``
- ``rpm_mariner_manifest``
- None
- https://github.com/microsoft/marinara/
* - RPM mariner distroless package license files
- ``*usr/share/licenses/*/COPYING*``
``*usr/share/licenses/*/LICENSE*``
- ``rpm``
- ``rpm_package_licenses``
- None
- https://github.com/microsoft/marinara/
* - RPM specfile
- ``*.spec``
- ``rpm``
Expand All @@ -734,6 +748,19 @@ parsers in scancode-toolkit during documentation builds.
- ``squashfs_disk_image``
- None
- https://en.wikipedia.org/wiki/SquashFS
* - JSON dump of Package.swift created with ``swift package dump-package > Package.swift.json``
- ``*/Package.swift.json``
- ``swift``
- ``swift_package_manifest_json``
- Swift
- https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html
* - Resolved full dependency lockfile for Package.swift created with ``swift package resolve``
- ``*/Package.resolved``
``*/.package.resolved``
- ``swift``
- ``swift_package_resolved``
- swift
- https://docs.swift.org/package-manager/PackageDescription/PackageDescription.html#package-dependency
* - Java Web Application Archive
- ``*.war``
- ``war``
Expand Down
4 changes: 4 additions & 0 deletions src/packagedcode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from packagedcode import readme
from packagedcode import rpm
from packagedcode import rubygems
from packagedcode import swift
from packagedcode import win_pe
from packagedcode import windows

Expand Down Expand Up @@ -196,6 +197,9 @@
rubygems.GemspecInExtractedGemHandler,
rubygems.GemspecHandler,

swift.SwiftManifestJsonHandler,
swift.SwiftPackageResolvedHandler,

windows.MicrosoftUpdateManifestHandler,

win_pe.WindowsExecutableHandler,
Expand Down
Loading
Loading