-
Notifications
You must be signed in to change notification settings - Fork 95
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from nexB/37-basic-scan
Add new pipeline for codebase scan for #37 Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
- Loading branch information
Showing
20 changed files
with
500 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.. _scancodeio_settings: | ||
|
||
ScanCode.io Settings | ||
==================== | ||
|
||
The ``.env`` file is created at the root of the ScanCode.io codebase during its | ||
installation. | ||
You can configure your preferences using the following settings in the ``.env`` | ||
file. | ||
|
||
SCANCODE_DEFAULT_OPTIONS | ||
------------------------ | ||
|
||
Use this settings to provide default options for running the scancode-toolkit. | ||
|
||
Refer to `ScanCode-toolkit Available Options <https://scancode-toolkit.readthedocs.io/en/latest/cli-reference/list-options.html>`_ | ||
for the full options list. | ||
|
||
The following example explicitly define a value for timeout and set the number | ||
of parallel processes to 4:: | ||
|
||
SCANCODE_DEFAULT_OPTIONS=--processes 4,--timeout 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
.. _scanpipe_tutorial_2: | ||
|
||
Scan Codebase (command line) | ||
============================ | ||
|
||
Requirements | ||
------------ | ||
|
||
- **ScanCode.io is installed**, see :ref:`installation` | ||
- **Shell access** on the machine where ScanCode.io is installed | ||
|
||
|
||
Before you start | ||
---------------- | ||
|
||
Download the following package archive save this in your home directory: | ||
`asgiref-3.3.0-py3-none-any.whl <https://files.pythonhosted.org/packages/c0/e8/578887011652048c2d273bf98839a11020891917f3aa638a0bc9ac04d653/asgiref-3.3.0-py3-none-any.whl>`_ | ||
|
||
|
||
Step-by-step | ||
------------ | ||
|
||
- Open a shell in the ScanCode.io installation directory and activate the virtualenv:: | ||
|
||
$ source bin/activate | ||
|
||
- The following command will create a new project named ``asgiref``, | ||
add the archive as an input for the project, | ||
add the ``scan_codebase`` pipeline, and run its execution:: | ||
|
||
$ scanpipe create-project asgiref \ | ||
--input asgiref-3.3.0-py3-none-any.whl \ | ||
--pipeline scanpipe/pipelines/scan_codebase.py \ | ||
--run | ||
|
||
.. note:: | ||
The content of the :guilabel:`input/` directory will be copied in the | ||
:guilabel:`codebase/` directory where ``extractcode`` will be run before | ||
running ``scancode``. | ||
Alternatively, the codebase content can be manually copied to the | ||
:guilabel:`codebase/` directory in which case the ``--input`` option can be | ||
omitted. | ||
|
||
- The scan results as JSON and CSV will be available in the project | ||
:guilabel:`output/` directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.