Giter Club home page Giter Club logo

Comments (4)

ferrarimarco avatar ferrarimarco commented on June 16, 2024

Hi! This looks like an enhancement request, also considering that this particular implementation didn't change.

What changed is that we fixed a couple of bugs that prevented this error for being reported, and we improved the error message.

We don't probably need the whole history, but we would be fine with the number of commits that allow super-linter to correctly get changes in case VALIDATE_ALL_CODEBASE is false (the default).

You can try setting fetch depth to a number > 0 and see if that works.

In that case, we might update the documentation and the error message to reflect that.

from super-linter.

ferrarimarco avatar ferrarimarco commented on June 16, 2024

In other words, we need a number of commits that allows these two commands to run:

DIFF_GIT_DEFAULT_BRANCH_CMD="git -C \"${GITHUB_WORKSPACE}\" diff --diff-filter=d --name-only ${DEFAULT_BRANCH}...${GITHUB_SHA} | xargs -I % sh -c 'echo \"${GITHUB_WORKSPACE}/%\"' 2>&1"

DIFF_TREE_CMD="git -C \"${GITHUB_WORKSPACE}\" diff-tree --no-commit-id --name-only -r --root ${GITHUB_SHA} ${GITHUB_BEFORE_SHA} | xargs -I % sh -c 'echo \"${GITHUB_WORKSPACE}/%\"' 2>&1"

so super-linter can correctly get diffs.

This is something that super-linter cannot know in advance because the actions/checkout happens before super-linter even runs.

What super-linter might do is to require a fetch depth >0 (i.e. require that a repository is not shallow), and check if the number of commits is enough to compute the diff. Although this is not clear yet.

from super-linter.

brennovich avatar brennovich commented on June 16, 2024

How did it work in the version 5? Oh! I just checked: https://github.com/super-linter/super-linter/blob/v5.7.2/lib/functions/buildFileList.sh#L99

from super-linter.

ferrarimarco avatar ferrarimarco commented on June 16, 2024

That way could potentially alter the state of the local repository, which is something that we don't want to do.

from super-linter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.