Skip to content

ci: ESLint checks more files than it should #8853

Description

@gratux

How can we otherwise help?

When a PR branch is not perfectly up-to-date with master, the ESLint workflow checks both the files changed in the PR (which it should) and the files changed on master (which it shouldn't in my opinion). In the case of my PR #8715 it causes the job to fail (logs), because it can't find a file added to master in my PR branch.

Here is the job log, showing the files checked by ESLint:
Image
Image
Image

and here is the list of files actually touched by my PR:
Image

This issue can be fixed by changing the workflow step slightly:

-FILES=$(git diff --diff-filter=ACM --name-only "$BASE" "$HEAD" \
+FILES=$(git diff --diff-filter=ACM --name-only "$BASE"..."$HEAD" \
  | grep -E '\.(js|json|md)$' || true)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions