diff --git a/docs/source/aboutcode-docs/writing_good_commit_messages.rst b/docs/source/aboutcode-docs/writing_good_commit_messages.rst
index 1a032f25..8fea78fc 100644
--- a/docs/source/aboutcode-docs/writing_good_commit_messages.rst
+++ b/docs/source/aboutcode-docs/writing_good_commit_messages.rst
@@ -1,3 +1,5 @@
+.. _good_commit_messages:
+
Writing good Commit Messages
============================
diff --git a/docs/source/conf.py b/docs/source/conf.py
index 61a2097f..5dac4ea8 100644
--- a/docs/source/conf.py
+++ b/docs/source/conf.py
@@ -36,8 +36,12 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
+'sphinx.ext.intersphinx'
]
+# Temporary Mapping, Once scancode-toolkit.readthedocs.io has the migrated docs, this can be changed to the same.
+intersphinx_mapping = {'scancode-toolkit': ('https://sphinx-test-ayan.readthedocs.io/en/scancode-toolkit/', None)}
+
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
diff --git a/docs/source/doc_maintenance.rst b/docs/source/doc_maintenance.rst
index d60fcab3..beb8c2fa 100644
--- a/docs/source/doc_maintenance.rst
+++ b/docs/source/doc_maintenance.rst
@@ -32,9 +32,15 @@ Now you can install the dependencies in a virtualenv::
cd aboutcode
virtualenv -p /usr/bin/python3.6 docs-venv
- source bin/activate
+ source docs-venv/bin/activate
-Now you can install Sphinx and the format theme used by readthedocs::
+Now, the following prerequisites are installed
+
+- Sphinx
+- sphinx_rtd_theme (the format theme used by ReadTheDocs)
+- docs8 (style linter)
+
+::
pip install Sphinx sphinx_rtd_theme doc8
@@ -83,6 +89,7 @@ system before creating a Pull Request.
cd docs
./scripts/sphinx_build_link_check.sh
+ ./scripts/doc8_style_check.sh
Share AboutCode Document Improvements
-------------------------------------
@@ -99,11 +106,224 @@ examples::
git push
git status
-The AboutCode webhook with ReadTheDocs should rebuild the documentation. You can review your
-results online.
+The AboutCode webhook with ReadTheDocs should rebuild the documentation after your Pull Request
+is Merged.
+
+Refer the `Pro Git Book `_ available online for Git tutorials
+covering more complex topics on Branching, Merging, Rebasing etc.
+
+Continuous Integration
+----------------------
+
+The documentations are checked on every new commit through Travis-CI, so that common errors are
+avoided and documentation standards are enforced. Travis-CI presently checks for these 3 aspects
+of the documentation :
+
+1. Successful Builds (By using ``sphinx-build``)
+2. No Broken Links (By Using ``link-check``)
+3. Linting Errors (By Using ``Doc8``)
+
+So run these scripts at your local system before creating a Pull Request::
+
+ cd docs
+ ./scripts/sphinx_build_link_check.sh
+ ./scripts/doc8_style_check.sh
+
+Style Checks Using ``Doc8``
+---------------------------
+
+How To Run Style Tests
+^^^^^^^^^^^^^^^^^^^^^^
+
+In the project root, run the following command::
+
+ $ doc8 --max-line-length 100 docs/source/ --ignore D000
+
+A sample output is::
+
+ Scanning...
+ Validating...
+ docs/source/scancode-toolkit/misc/licence_policy_plugin.rst:37: D002 Trailing whitespace
+ docs/source/scancode-toolkit/misc/faq.rst:45: D003 Tabulation used for indentation
+ docs/source/scancode-toolkit/misc/faq.rst:9: D001 Line too long
+ docs/source/scancode-toolkit/misc/support.rst:6: D005 No newline at end of file
+ ========
+ Total files scanned = 34
+ Total files ignored = 0
+ Total accumulated errors = 326
+ Detailed error counts:
+ - CheckCarriageReturn = 0
+ - CheckIndentationNoTab = 75
+ - CheckMaxLineLength = 190
+ - CheckNewlineEndOfFile = 13
+ - CheckTrailingWhitespace = 47
+ - CheckValidity = 1
+
+Now fix the errors and run again till there isn't any style error in the documentation.
+
+What is Checked?
+^^^^^^^^^^^^^^^^
+
+PyCQA is an Organization for code quality tools (and plugins) for the Python programming language.
+Doc8 is a sub-project of the same Organization. Refer this `README `_ for more details.
+
+What is checked:
+
+ - invalid rst format - D000
+ - lines should not be longer than 100 characters - D001
+
+ - RST exception: line with no whitespace except in the beginning
+ - RST exception: lines with http or https URLs
+ - RST exception: literal blocks
+ - RST exception: rst target directives
+
+ - no trailing whitespace - D002
+ - no tabulation for indentation - D003
+ - no carriage returns (use UNIX newlines) - D004
+ - no newline at end of file - D005
+
+Interspinx
+----------
+
+Aboutcode documentation uses `Intersphinx `_
+to create links to other Sphinx Documentations, to maintain links to other Aboutcode Projects.
+
+To link sections in the same documentation, standart reST labels are used. Refer
+`Cross-Referencing `_ for more information.
+
+For example::
+
+ .. _my-reference-label:
+
+ Section to cross-reference
+ --------------------------
+
+ This is the text of the section.
+
+ It refers to the section itself, see :ref:`my-reference-label`.
+
+Now, using Intersphinx, you can create these labels in one Sphinx Documentation and then referance
+these labels from another Sphinx Documentation, hosted in different locations.
+
+You just have to add the following in the ``conf.py`` file for your Sphinx Documentation, where you
+want to add the links::
+
+ extensions = [
+ 'sphinx.ext.intersphinx'
+ ]
+
+ intersphinx_mapping = {'scancode-toolkit': ('https://scancode-toolkit.readthedocs.io/en/latest/', None)}
+
+To show all Intersphinx links and their targets of an Intersphinx mapping file, run::
+
+ python -msphinx.ext.intersphinx https://scancode-toolkit.readthedocs.io/en/latest/objects.inv
+
+.. WARNING::
+
+ ``python -msphinx.ext.intersphinx https://scancode-toolkit.readthedocs.io/objects.inv`` will
+ give error.
+
+This enables you to create links to the ``scancode-toolkit`` Documentation in your own
+Documentation, where you modified the configuration file. Links can be added like this::
+
+ For more details refer :ref:`scancode-toolkit:doc_style_guide`.
+
+You can also not use the ``scancode-toolkit`` label assigned to all links from
+scancode-toolkit.readthedocs.io, if you don't have a label having the same name in your Sphinx
+Documentation. Example::
+
+ For more details refer :ref:`doc_style_guide`.
+
+If you have a label in your documentation which is also present in the documentation linked by
+Intersphinx, and you link to that label, it will create a link to the local label.
+
+For more information, refer this tutorial named
+`Using Intersphinx `_.
+
+Extra Style Checks
+------------------
+
+1. Headings
+
+ (`Refer `_)
+ Normally, there are no heading levels assigned to certain characters as the structure is
+ determined from the succession of headings. However, this convention is used in Python’s Style
+ Guide for documenting which you may follow:
+
+ # with overline, for parts
+
+ * with overline, for chapters
+
+ =, for sections
+
+ -, for subsections
+
+ ^, for sub-subsections
+
+ ", for paragraphs
+
+2. Heading Underlines
+
+ Do not use underlines that are longer/shorter than the title headline itself. As in:
+
+::
+
+ Correct :
+
+ Extra Style Checks
+ ------------------
+
+ Incorrect :
+
+ Extra Style Checks
+ ------------------------
+
+.. note::
+
+ Underlines shorter than the Title text generates Errors on sphinx-build.
+
+
+3. Internal Links
+
+ Using ``:ref:`` is advised over standard reStructuredText links to sections (like
+ ```Section title`_``) because it works across files, when section headings are changed, will
+ raise warnings if incorrect, and works for all builders that support cross-references.
+ However, external links are created by using the standard ```Section title`_`` method.
+
+4. Eliminate Redundancy
+
+ If a section/file has to be repeated somewhere else, do not write the exact same section/file
+ twice. Use ``.. include: ../README.rst`` instead. Here, ``../`` refers to the documentation
+ root, so file location can be used accordingly. This enables us to link documents from other
+ upstream folders.
+
+5. Using ``:ref:`` only when necessary
+
+ Use ``:ref:`` to create internal links only when needed, i.e. it is referenced somewhere.
+ Do not create references for all the sections and then only reference some of them, because
+ this created unnecessary references. This also generates ERROR in ``restructuredtext-lint``.
+
+6. Spelling
+
+ You should check for spelling errors before you push changes. `Aspell `_
+ is a GNU project Command Line tool you can use for this purpose. Download and install Aspell,
+ then execute ``aspell check `` for all the files changed. Be careful about not
+ changing commands or other stuff as Aspell gives prompts for a lot of them. Also delete the
+ temporary ``.bak`` files generated. Refer the `manual `_ for more
+ information on how to use.
+
+7. Notes and Warning Snippets
+
+ Every ``Note`` and ``Warning`` sections are to be kept in ``rst_snippets/note_snippets/`` and
+ ``rst_snippets/warning_snippets/`` and then included to eliminate redundancy, as these are
+ frequently used in multiple files.
+
+Converting from Markdown
+------------------------
-Documentation Style Guides
---------------------------
+If you want to convert a ``.md`` file to a ``.rst`` file, this `tool `_
+does it pretty well. You'd still have to clean up and check for errors as this contains a lot of
+bugs. But this is definitely better than converting everything by yourself.
-The ``scancode-toolkit`` documentation is compliant to our doc style standards, enforced using
-``doc8``. For more details refer :ref:`contrib_doc_dev`.
+This will be helpful in converting GitHub wiki's (Markdown Files) to reStructuredtext files for
+Sphinx/ReadTheDocs hosting.
diff --git a/docs/source/index.rst b/docs/source/index.rst
index 390791ca..0c8a5d55 100644
--- a/docs/source/index.rst
+++ b/docs/source/index.rst
@@ -25,6 +25,14 @@ Documentation Guide
doc_maintenance
+Getting Started
+***************
+
+.. toctree::
+ :maxdepth: 2
+
+ scancode-toolkit/getting-started/newcomer
+
Tutorial Documents
******************
@@ -65,3 +73,7 @@ Indices and Tables
* :ref:`genindex`
* :ref:`modindex`
+
+.. _improve_docs:
+
+.. include:: /scancode-toolkit/rst_snippets/improve_docs.rst
diff --git a/docs/source/scancode-toolkit/cli-reference/basic-options.rst b/docs/source/scancode-toolkit/cli-reference/basic-options.rst
index c04d87ad..a817216f 100644
--- a/docs/source/scancode-toolkit/cli-reference/basic-options.rst
+++ b/docs/source/scancode-toolkit/cli-reference/basic-options.rst
@@ -5,6 +5,10 @@
----
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
+----
+
``--generated`` Options
-----------------------
@@ -12,7 +16,7 @@
An example of using ``--generated`` in a scan::
- ./scancode -clpieu --json-pp output.json samples --generated
+ scancode -clpieu --json-pp output.json samples --generated
In the results, for each file the following attribute is added with it's corresponding
``true``/``false`` value ::
@@ -47,7 +51,7 @@
An example usage::
- ./scancode -clpieu --json-pp output.json samples --max-email 5
+ scancode -clpieu --json-pp output.json samples --max-email 5
This only reports 5 email addresses per file and ignores the rest.
@@ -71,7 +75,7 @@
An example usage::
- ./scancode -clpieu --json-pp output.json samples --max-url 10
+ scancode -clpieu --json-pp output.json samples --max-url 10
This only reports 10 urls per file and ignores the rest.
@@ -100,7 +104,7 @@
An example usage::
- ./scancode -clpieu --json-pp output.json samples --license-score 70
+ scancode -clpieu --json-pp output.json samples --license-score 70
Here's the license results on setting the integer value to 100, Vs. the default value 0. This is
visualized using ScanCode workbench in the License Info Dashboard.
@@ -134,7 +138,7 @@
An example Scan::
- ./scancode -cplieu --json-pp output.json samples --license-text
+ scancode -cplieu --json-pp output.json samples --license-text
An example matched text included in the results is as follows::
@@ -178,7 +182,7 @@
A scan example using the ``--license-url-template TEXT`` option ::
- ./scancode -clpieu --json-pp output.json samples --license-url-template https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/{}.yml
+ scancode -clpieu --json-pp output.json samples --license-url-template https://github.com/nexB/scancode-toolkit/tree/develop/src/licensedcode/data/licenses/{}.yml
In a normal scan, reference url for "ZLIB License" is as follows::
@@ -212,7 +216,7 @@
An example Scan::
- ./scancode -cplieu --json-pp output.json samples --license-text --license-text-diagnostics
+ scancode -cplieu --json-pp output.json samples --license-text --license-text-diagnostics
Running a scan on the samples directory with ``--license-text --license-text-diagnostics`` options,
causes the following difference in the scan result of the file
diff --git a/docs/source/scancode-toolkit/cli-reference/core-options.rst b/docs/source/scancode-toolkit/cli-reference/core-options.rst
index 8ee6084f..04d1ddbe 100644
--- a/docs/source/scancode-toolkit/cli-reference/core-options.rst
+++ b/docs/source/scancode-toolkit/cli-reference/core-options.rst
@@ -7,6 +7,10 @@
----
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
+----
+
Comparing Progress Message Options
----------------------------------
@@ -89,7 +93,7 @@ Comparing Progress Message Options
An example scan command using ``--from-json``::
- ./scancode --from-json sample.json --json-pp sample_2.json --classify
+ scancode --from-json sample.json --json-pp sample_2.json --classify
This inputs the scan results from ``sample.json``, runs the post-scan plugin ``--classify`` and
outputs the results for this scan to ``sample_2.json``.
@@ -114,4 +118,4 @@ Comparing Progress Message Options
An example usage::
- ./scancode -clieu --json-pp sample.json samples --max-in-memory -1
+ scancode -clieu --json-pp sample.json samples --max-in-memory -1
diff --git a/docs/source/scancode-toolkit/cli-reference/help-text-options.rst b/docs/source/scancode-toolkit/cli-reference/help-text-options.rst
index ba616742..11133a0e 100644
--- a/docs/source/scancode-toolkit/cli-reference/help-text-options.rst
+++ b/docs/source/scancode-toolkit/cli-reference/help-text-options.rst
@@ -20,19 +20,11 @@ displays basic usage, and some simple examples. The command line option for this
You can also use the shorter ``-h`` option, which does the same.
-For Linux based systems the full command is::
-
- $ ./scancode --help
-
-And for windows, it will be like::
+To see the help text from the Terminal, execute the following command::
$ scancode --help
-.. note::
-
- Make sure you are in the Scancode Root Directory before carrying out this command. After
- extracting the ``.zip`` or ``.tar.bz`` file, the folder for Scancode-Toolkit version 3.1.1
- will be named like "scancode-toolkit-3.1.1".
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
The Following Help Text is displayed, i.e. This is the help text for Scancode Version 3.1.1 ::
@@ -235,14 +227,12 @@ of code scanning:
The command line option for displaying these basic examples is ``--examples``.
-For Linux based systems the full command is::
-
- $ ./scancode --examples
-
-And for windows, it will be like::
+To see the help text from the Terminal, execute the following command::
$ scancode --examples
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
The Following Text is displayed, i.e. This is the examples for Scancode Version 3.1.1 ::
Scancode command lines examples:
@@ -311,14 +301,12 @@ The command line option for displaying all the plugins is:
- ``--plugins``
-For Linux based systems the full command is::
-
- $ ./scancode --plugins
-
-And for windows, it will be like::
+To see the help text from the Terminal, execute the following command::
$ scancode --plugins
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
.. note::
Plugins that are shown by using ``--plugins`` include the following:
@@ -772,7 +760,7 @@ This option prints the options selected for one specific scan command.
If we run this command::
- ./scancode -clpieu --json-pp sample.json samples --classify --summary --summary-with-details --print-options
+ scancode -clpieu --json-pp sample.json samples --classify --summary --summary-with-details --print-options
The output will be::
diff --git a/docs/source/scancode-toolkit/cli-reference/list-options.rst b/docs/source/scancode-toolkit/cli-reference/list-options.rst
index 06ad2e66..8813b178 100644
--- a/docs/source/scancode-toolkit/cli-reference/list-options.rst
+++ b/docs/source/scancode-toolkit/cli-reference/list-options.rst
@@ -18,6 +18,8 @@ There's also another section for ``extractcode`` options.
The order of the sections and all their options is the same as in the :ref:'cli_help_text',
available in the command line.
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
.. _cli_basic:
.. include:: /scancode-toolkit/rst_snippets/basic_options.rst
diff --git a/docs/source/scancode-toolkit/cli-reference/output-filters-and-control.rst b/docs/source/scancode-toolkit/cli-reference/output-filters-and-control.rst
index d113f383..e8788a48 100644
--- a/docs/source/scancode-toolkit/cli-reference/output-filters-and-control.rst
+++ b/docs/source/scancode-toolkit/cli-reference/output-filters-and-control.rst
@@ -7,6 +7,10 @@ Controlling Scancode Output and Filters
----
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
+----
+
``--strip-root`` Vs. ``--full-root``
------------------------------------
@@ -17,7 +21,7 @@ Controlling Scancode Output and Filters
::
- ./scancode -cplieu --json-pp output.json samples --full-root
+ scancode -cplieu --json-pp output.json samples --full-root
These two changes only the "path" attribute of the file information. For this comparison we
compare the "path" attributes of the file ``LICENSE`` inside ``JGroups`` directory.
@@ -53,7 +57,7 @@ Controlling Scancode Output and Filters
This scan ignores all files with authors matching the string "Apache Software Foundation"::
- ./scancode -cplieu --json-pp output.json samples --ignore-author "Apache Software Foundation"
+ scancode -cplieu --json-pp output.json samples --ignore-author "Apache Software Foundation"
More information on :ref:`glob_pattern_matching`.
@@ -71,7 +75,7 @@ Controlling Scancode Output and Filters
This scan ignores all files with Copyright Holders matching the string "Free Software Foundation"::
- ./scancode -cplieu --json-pp output.json samples --ignore-copyright-holder "Free Software Foundation"
+ scancode -cplieu --json-pp output.json samples --ignore-copyright-holder "Free Software Foundation"
More information on :ref:`glob_pattern_matching`.
@@ -86,7 +90,7 @@ Controlling Scancode Output and Filters
An example Scan::
- ./scancode -cplieu --json-pp output.json samples --only-findings
+ scancode -cplieu --json-pp output.json samples --only-findings
.. note::
diff --git a/docs/source/scancode-toolkit/cli-reference/output-format.rst b/docs/source/scancode-toolkit/cli-reference/output-format.rst
index f36b9a81..4f416fff 100644
--- a/docs/source/scancode-toolkit/cli-reference/output-format.rst
+++ b/docs/source/scancode-toolkit/cli-reference/output-format.rst
@@ -12,6 +12,10 @@ following options.
----
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
+----
+
.. _output_to_stdout:
.. include:: /scancode-toolkit/rst_snippets/stdout.rst
@@ -30,7 +34,7 @@ following options.
The following code performs a scan on the samples directory, and publishes the results in
``json`` format::
- ./scancode -clpieu --json output.json samples
+ scancode -clpieu --json output.json samples
.. include:: /scancode-toolkit/rst_snippets/note_snippets/output_json_ugly.rst
@@ -144,7 +148,7 @@ following options.
The following code performs a scan on the samples directory, and publishes the results in
``json-pp`` format::
- ./scancode -clpieu --json-pp output.json samples
+ scancode -clpieu --json-pp output.json samples
A sample JSON output for an individual file will look like::
@@ -247,7 +251,7 @@ following options.
The following code performs a scan on the samples directory, and publishes the results in
``json-lines`` format::
- ./scancode -clpieu --json-lines output.json samples
+ scancode -clpieu --json-lines output.json samples
Here is a sample line from a report generated by the ``jsonlines`` format::
@@ -342,7 +346,7 @@ Comparing Different ``json`` Output Formats
The following code performs a scan on the samples directory, and publishes the results in
``spdx-rdf`` format::
- ./scancode -clpieu --spdx-rdf output.spdx samples
+ scancode -clpieu --spdx-rdf output.spdx samples
Learn more about SPDX specifications `here `_ and in this GitHub
`repository `_.
@@ -363,7 +367,7 @@ Comparing Different ``json`` Output Formats
The following code performs a scan on the samples directory, and publishes the results in
``spdx-tv`` format::
- ./scancode -clpieu --spdx-tv output.spdx samples
+ scancode -clpieu --spdx-tv output.spdx samples
A SPDX-TV file starts with::
@@ -431,7 +435,7 @@ Comparing Different ``json`` Output Formats
The following code performs a scan on the samples directory, and publishes the results in
HTML format::
- ./scancode -clpieu --html output.html samples
+ scancode -clpieu --html output.html samples
The HTML page generated has these following Tables:
@@ -457,10 +461,12 @@ Comparing Different ``json`` Output Formats
ScanCode also supports formatting the output in a HTML visualization tool, which is more
helpful than the standard HTML format.
+ .. include:: /scancode-toolkit/rst_snippets/warning_snippets/output_htmlapp_dep.rst
+
The following code performs a scan on the samples directory, and publishes the results in
``html-app`` format::
- ./scancode -clpieu --csv output.html samples
+ scancode -clpieu --csv output.html samples
The Files scanned are shown in the left sidebar, and the section on the right contains separate
tabs for the following:
@@ -476,8 +482,6 @@ Comparing Different ``json`` Output Formats
.. include:: /scancode-toolkit/rst_snippets/note_snippets/output_htmlapp_search.rst
- .. include:: /scancode-toolkit/rst_snippets/warning_snippets/output_htmlapp_dep.rst
-
.. figure:: data/output_html_app1.png
.. figure:: data/output_html_app2.png
@@ -494,7 +498,7 @@ Comparing Different ``json`` Output Formats
The following code performs a scan on the samples directory, and publishes the results in
``csv`` format::
- ./scancode -lpceiu --csv sample.csv samples
+ scancode -lpceiu --csv sample.csv samples
The first line of the csv file contains the headings, and they are:
diff --git a/docs/source/scancode-toolkit/cli-reference/scan-options-post.rst b/docs/source/scancode-toolkit/cli-reference/scan-options-post.rst
index a31f0437..82ff546b 100644
--- a/docs/source/scancode-toolkit/cli-reference/scan-options-post.rst
+++ b/docs/source/scancode-toolkit/cli-reference/scan-options-post.rst
@@ -7,6 +7,10 @@ Post-Scan options activate their respective post-scan plugins which execute the
.. include:: /scancode-toolkit/rst_snippets/post_scan_options.rst
+----
+
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
To see all plugins available via command line help, use ``--plugins``.
.. include:: /scancode-toolkit/rst_snippets/note_snippets/post_scan_plugins.rst
@@ -26,7 +30,7 @@ To see all plugins available via command line help, use ``--plugins``.
When the following command is executed to scan the ``samples`` directory with this option enabled::
- ./scancode -clpieu --json-pp output.json samples --mark-source
+ scancode -clpieu --json-pp output.json samples --mark-source
Then, the following directories are marked as "Source", i.e. Their "is_source" attribute is changed
from "false" to "True".
@@ -52,7 +56,7 @@ To see all plugins available via command line help, use ``--plugins``.
An example Scan::
- ./scancode -clpieu --json-pp output.json samples --consolidate
+ scancode -clpieu --json-pp output.json samples --consolidate
The JSON output file is structured as follows::
@@ -129,6 +133,12 @@ To see all plugins available via command line help, use ``--plugins``.
[ToDo] Resolve Error and then Add content
[ERROR] Check https://github.com/nexB/scancode-toolkit/issues/1758
+ .. WARNING::
+
+ Running the following scan generates an error::
+
+ ./scancode -clp --json-pp sample_filter_clues.json samples --filter-clues
+
----
``--is-license-text`` Option
@@ -146,7 +156,7 @@ To see all plugins available via command line help, use ``--plugins``.
An example Scan::
- ./scancode -clpieu --json-pp output.json samples --license-text --is-license-text
+ scancode -clpieu --json-pp output.json samples --license-text --is-license-text
If the samples directory is scanned with this plugin, the files containing mostly license texts
will have the following attribute set to 'true'::
@@ -184,7 +194,7 @@ To see all plugins available via command line help, use ``--plugins``.
An example Scan::
- ./scancode -clpieu --json-pp output.json samples --classify --license-clarity-score
+ scancode -clpieu --json-pp output.json samples --classify --license-clarity-score
The "license_clarity_score" will have the following attributes:
@@ -243,7 +253,7 @@ To see all plugins available via command line help, use ``--plugins``.
Applying License Policies during a ScanCode scan, using the ``--license-policy`` Plugin::
- ./scancode -clipeu --json-pp output.json samples --license-policy policy-file.yml
+ scancode -clipeu --json-pp output.json samples --license-policy policy-file.yml
.. include:: /scancode-toolkit/rst_snippets/note_snippets/post_lic_pol_notsub.rst
@@ -307,7 +317,7 @@ To see all plugins available via command line help, use ``--plugins``.
An example Scan::
- ./scancode -clpieu --json-pp output.json samples --summary
+ scancode -clpieu --json-pp output.json samples --summary
The whole JSON file is structured as follows, when the ``--summary`` plugin is applied::
@@ -437,7 +447,7 @@ To see all plugins available via command line help, use ``--plugins``.
An example scan using the ``--summary-by-facet`` Plugin::
- ./scancode -clieu --json-pp output.json samples --summary --facet dev="*.java" --facet dev="*.c" --summary-by-facet
+ scancode -clieu --json-pp output.json samples --summary --facet dev="*.java" --facet dev="*.c" --summary-by-facet
.. include:: /scancode-toolkit/rst_snippets/note_snippets/pre_facet_core.rst
@@ -584,7 +594,7 @@ To see all plugins available via command line help, use ``--plugins``.
An example Scan::
- ./scancode -clpieu --json-pp output.json samples --classify --summary --summary-key-files
+ scancode -clpieu --json-pp output.json samples --classify --summary --summary-key-files
Running the scan with ``--summary --summary-key-files`` Plugins creates summaries for key files
with the same license, copyright and other scan information, at a codebase level (in addition
@@ -665,7 +675,7 @@ To see all plugins available via command line help, use ``--plugins``.
An example Scan::
- ./scancode -clpieu --json-pp output.json samples --summary-with-details
+ scancode -clpieu --json-pp output.json samples --summary-with-details
.. include:: /scancode-toolkit/rst_snippets/note_snippets/post_summary_details.rst
diff --git a/docs/source/scancode-toolkit/cli-reference/scan-options-pre.rst b/docs/source/scancode-toolkit/cli-reference/scan-options-pre.rst
index a3c2e1c8..6b6603f8 100644
--- a/docs/source/scancode-toolkit/cli-reference/scan-options-pre.rst
+++ b/docs/source/scancode-toolkit/cli-reference/scan-options-pre.rst
@@ -7,6 +7,10 @@ Pre-Scan Options
----
+.. include:: /scancode-toolkit/rst_snippets/note_snippets/synopsis_install_quickstart.rst
+
+----
+
``--ignore`` Option
-------------------
@@ -16,7 +20,7 @@ Pre-Scan Options
A sample usage::
- ./scancode --ignore "*.java" samples samples.json
+ scancode --ignore "*.java" samples samples.json
Here, Scancode ignores files ending with `.java`, and continues with other files as usual.
@@ -33,7 +37,7 @@ Pre-Scan Options
A sample usage::
- ./scancode --include "*.java" samples samples.json
+ scancode --include "*.java" samples samples.json
Here, Scancode selectively scans files that has names ending with `.java`, and ignores all other files. This
is basically complementary in behavior to the ``--ignore`` option.
@@ -51,6 +55,10 @@ Pre-Scan Options
``--classify``. ``--license-clarity-score`` and ``--summary-key-files`` are Post-Scan
Options.
+ The ``--classify`` option can be used like::
+
+ scancode -clpieu --json-pp sample_facet.json samples --classify
+
This option makes ScanCode further classify scanned files/directories, to determine whether they
fall in these following categories
@@ -97,7 +105,7 @@ Pre-Scan Options
You can use the ``--facet`` option in the following manner::
- ./scancode -clpieu --json-pp sample_facet.json samples --facet dev="*.java" --facet dev="*.c"
+ scancode -clpieu --json-pp sample_facet.json samples --facet dev="*.java" --facet dev="*.c"
This adds to the header object, the following attribute::
diff --git a/docs/source/scancode-toolkit/cli-reference/synopsis.rst b/docs/source/scancode-toolkit/cli-reference/synopsis.rst
index a7dc33ad..2fb62503 100644
--- a/docs/source/scancode-toolkit/cli-reference/synopsis.rst
+++ b/docs/source/scancode-toolkit/cli-reference/synopsis.rst
@@ -1,3 +1,5 @@
+.. _cli_synopsis:
+
Synopsis
========
@@ -5,34 +7,55 @@ ScanCode detects licenses, copyrights, package manifests and direct dependencies
in source code and binary files, by scanning the files. This page introduces you to the ScanCode
Toolkit Command Line Interface in the following sections:
+- Installation
- Quickstart
- Type of Options
- Output Formats
- Other Important Documentation
+.. _syn_install:
+
+Installation
+------------
+
+Scancode-Toolkit installation can be installed from ``pip``, the default Python Package Manager.
+However, there are more ways to perform an installation, and refer the following sections for
+detailed Instructions on the each of the Installation Methods.
+
+- :ref:`pip_install`
+- :ref:`latest_release_download_install`
+- :ref:`source_configure_install`
+
+.. _synopsis_quickstart:
+
Quickstart
----------
-The basic usage is::
+The basic command to perform a scan, if Scancode is installed from ``pip``::
- path/to/scancode [OPTIONS]