Page MenuHomeSoftware Heritage

code scanner prototype
Needs RevisionPublic

Authored by DanSeraf on Wed, Feb 12, 12:13 PM.

Details

Reviewers
vlorentz
Group Reviewers
Reviewers
Summary

First prototype of the code scanner

input: the root path to scan
output: currently, the response is a set containing pairs of: (path discovered, PID of path discovered)

The persistent identifier of the directories and files are calculated with the functions pid_of_file and pid_of_dir of swh.model.cli.

Diff Detail

Repository
rDTSCN swh-scanner
Branch
codescanner-prototype
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10560
Build 15755: arc lint + arc unit

Event Timeline

DanSeraf created this revision.Wed, Feb 12, 12:13 PM
vlorentz requested changes to this revision.Wed, Feb 12, 12:27 PM
vlorentz added a subscriber: vlorentz.

I'm missing context on what this code scanner does, so I'm only commenting on documentation for now.

New code should use type annotations, instead of having types in the docstring.

swh/foo/py.typed
1

re-add this file

swh/scanner/cli.py
28

Should have a docstring explaining what it does.

And if the whole package contains "scanner tools", then the command should have a more specific name telling what it does

swh/scanner/scanner.py
19–29

Missing description.

60–70
79–87

same

This revision now requires changes to proceed.Wed, Feb 12, 12:27 PM