Command-line interface#
swh scanner scan#
Scan a source code project to discover files and directories already present in the archive.
The command opens by default an interactive dashboard after scanning. Can be disabled by the –no-web-ui flag.
The command can provide different output using the –output-format option:
- text: display the scan result as a text based tree-like view of all the
file, using color to indicate the file status.
json: write all collected data on standard output as JSON
ndjson: write all collected data on standard output as Newline Delimited JSON
Exclusion patterns can be set with the repeatable -x/–exclude option:
*.git
to exclude all .git directories)Common default exclusion patterns and exclusion patterns defined in your global SWH configuration file can be disabled using the –disable-global-patterns option.
Version control system ignore files detection for exclusion (e.g. .gitignore, .hgignore, svn ignore file) can be disabled using the –disable-vcs-patterns option.
swh scanner scan [OPTIONS] [ROOT_PATH]
Options
- -u, --api-url <API_URL>#
URL for the api request
- -t, --exclude-template <EXCLUDE_TEMPLATES>#
Repeatable option to exclude files and directories using an exclusion template (e.g.,
Python
for common exclusion patterns in a Python project). Valid values are: AL, Actionscript, Ada, Agda, AltiumDesigner, Android, Anjuta, Ansible, AppEngine, AppceleratorTitanium, ArchLinuxPackages, Archives, AtmelStudio, AutoIt, Autotools, B4X, Backup, Bazaar, Bazel, Beef, Bitrix, BricxCC, C, C++, CDK, CFWheels, CMake, CUDA, CVS, CakePHP, Calabash, ChefCookbook, Clojure, Cloud9, CodeIgniter, CodeKit, CodeSniffer, CommonLisp, Composer, Concrete5, Coq, Cordova, CraftCMS, D, DM, Dart, DartEditor, Delphi, Diff, Dreamweaver, Dropbox, Drupal, Drupal7, EPiServer, Eagle, Eclipse, EiffelStudio, Elisp, Elixir, Elm, Emacs, Ensime, Erlang, Espresso, Exercism, ExpressionEngine, ExtJs, Fancy, Finale, FlaxEngine, FlexBuilder, ForceDotCom, Fortran, FuelPHP, GNOMEShellExtension, GPG, GWT, Gcov, GitBook, Go, Go.AllowList, Godot, Gradle, Grails, Gretl, Haskell, Hugo, IAR_EWARM, IGORPro, Idris, Images, InforCMS, JBoss, JBoss4, JBoss6, JDeveloper, JENKINS_HOME, JEnv, Java, Jekyll, JetBrains, Jigsaw, Joomla, Julia, JupyterNotebooks, KDevelop4, Kate, Kentico, KiCad, Kohana, Kotlin, LabVIEW, Laravel, Lazarus, Leiningen, LemonStand, LensStudio, LibreOffice, Lilypond, Linux, Lithium, Logtalk, Lua, LyX, MATLAB, Magento, Magento1, Magento2, Maven, Mercurial, Mercury, MetaProgrammingSystem, Metals, Meteor, MicrosoftOffice, ModelSim, Momentics, MonoDevelop, NWjs, Nanoc, NasaSpecsIntact, NetBeans, Nikola, Nim, Ninja, Nix, Node, NotepadPP, OCaml, Objective-C, Octave, Opa, OpenCart, OpenSSL, OracleForms, Otto, PSoCCreator, Packer, Patch, Perl, Phalcon, Phoenix, Pimcore, PlayFramework, Plone, Prestashop, Processing, PuTTY, Puppet, PureScript, Python, Qooxdoo, Qt, R, ROS, ROS2, Racket, Rails, Raku, Red, Redcar, Redis, RhodesRhomobile, Ruby, Rust, SAM, SBT, SCons, SPFx, SVN, Sass, Scala, Scheme, Scrivener, Sdcc, SeamGen, SketchUp, SlickEdit, Smalltalk, Snap, Splunk, Stata, Stella, Strapi, SublimeText, SugarCRM, Swift, Symfony, SymphonyCMS, Syncthing, SynopsysVCS, Tags, TeX, Terraform, TextMate, Textpattern, ThinkPHP, Toit, TortoiseGit, TurboGears2, TwinCAT3, Typo3, Umbraco, Unity, UnrealEngine, V, VVVV, Vagrant, Vim, VirtualEnv, Virtuoso, VisualStudio, VisualStudioCode, Vue, Waf, WebMethods, Windows, WordPress, Xcode, Xilinx, XilinxISE, Xojo, Yeoman, Yii, ZendFramework, Zephir, core, esp-idf, macOS, uVision
- -x, --exclude <PATTERNS>#
Exclude directories using glob patterns (e.g.,
*.git
to exclude all .git directories)
- -f, --output-format <out_fmt>#
The output format
- Default:
'summary'
- Options:
summary | text | json | ndjson
- --web-ui, --no-web-ui#
Launch the default graphical web browser to explore the results in a dashboard.
- --provenance#
Also fetch provenance data (requires special permission from SWH).
- --debug-http#
Show debug information about the http request
- --disable-global-patterns#
Disable common and global exclusion patterns.
- --disable-vcs-patterns#
Disable vcs ignore detection for exclusion patterns
- -c, --project-config-file <project_config_file>#
Project Configuration file path.
- --provenance-concurrency <provenance_concurrency>#
Number of concurrent connections to the web API.
- --provenance-batch-size <provenance_batch_size>#
Batch size when querying the provenance API.
Arguments
- ROOT_PATH#
Optional argument