Code quality: cloning git LFS files probably not needed

Summary

A code quality job clones a full repository, including all git LFS files, which are probably not needed for the analysis.

Steps to reproduce

  1. Add codequality job for repo containing git LFS files as in https://docs.gitlab.com/ee/ci/examples/code_climate.html
  2. Run codequality job
  3. Inspect log file

Example Project

Example project can be found here: https://gitlab.com/stekaiser/code-quality-git-lfs

Respective code quality job: https://gitlab.com/stekaiser/code-quality-git-lfs/-/jobs/34322751

What is the current bug behavior?

The repo is cloned including the (sometimes large) git LFS files.

What is the expected correct behavior?

Skip downloading the files.

Relevant logs and/or screenshots

...
Cloning repository...
Cloning into '/builds/stekaiser/code-quality-git-lfs'...
Checking out ba0d5b08 as add-codequality-CI...
Downloading logo.jpg (23.28 KB)
...

Output of checks

This bug happens on GitLab.com

Possible fixes

Define GIT_LFS_SKIP_SMUDGE=1 at clone time (https://github.com/git-lfs/git-lfs/issues/720#issuecomment-146794838).

Assignee Loading
Time tracking Loading