Skip to content

Detect supported projects

Fabien Catteau requested to merge 263441-detect into master

What does this MR do?

Detect supported projects and package managers based on directory contents, and scan projects instead of files:

  • Finder is now based on project detection, and returns projects w/ corresponding package managers
  • Finder is configured with presets that correspond to gemnasium, gemnasium-maven, and gemnasium-python
  • Scanner scans projects, and not files

File combines a file name with a type. Types are requirements file, lock file, and dependency graph export. A file has no path.

The File struct is used to describe:

  • files of a detected project
  • files supported by package managers

PackageManager combines a name, a package type, and the files the package manager handles. In this context, the files are pattern really.

Project combines a set of files with a directory where they've been found (relative to the search directory), and the package manager handling these files. Project provides functions to retrieve specific files (used by builder and scanner), and to add a dependency graph export (used by builder).

This is a reverse dependency of:

TODO

  • Add unit tests for detect functions

What are the relevant issue numbers?

gitlab-org/gitlab#263441 (closed)

Does this MR meet the acceptance criteria?

Edited by Fabien Catteau

Merge request reports