aboutcode-org / aboutcode-org/commoncode

The root of the problem is the root: How to get a root at all times in a codebase (or no root at all)

Abierto
#25 5 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Python
Estrellas
4
Forks
23
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

The root problem is this:
1. ScanCode TK demands a single root named Resource in a Codebase
2. ScanCode TK creates a fake "virtual_root" name if there is no common root in several scans (--from-json /VirtualCodebases)
3. ScanCode.io does not have a single root for a project (or rather it has one which might be the "codebase" directory, but never reports it.
4. on Windows there is no single root: each "drive" is its own root.
5. on POSIX, there is a single root, but it has no name: this is name only "/" and it can have files and directories as children
6. ScanCode TK and CommonCode generally ignore or even strip a leading slash therefore making the POSIX root moot
7. When you "--strip-root" in ScanCode TK (leaving aside the possible loss of data attached to a root dir) it is potentially problematic to further read this with --from-json because we have no root anymore.
8. Scanning a subset of paths or a collections of path in ScanCode is problematic because of this need for root
9. The Codebase classes expect some sort order when creating Resources which may not make sense in all cases and may be overly restrictive as we cannot predict this sort order at all times
9. Somethings are not entirely clear:
- what is the different between a Codebase and a root Resource?
- why could a Codebase not be just a collection of paths? And why do we even need a root?

We need to define a clean and well spec way to handle this across all projects

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.