`glab ci lint` fails with include file

Description

If my .gitlab-ci.yml include a other.yml file according too the documentation, the glab ci lint fails: 1 Local file other.yml` does not have project!

However the pipeline runs fines on the gitlab ci server.

Expected Behavior vs Actual Behavior

Linting should behave identically both locally and remotely

Possible Fix

No idea but it has been noticed here too: https://github.com/zaquestion/lab/issues/337

Steps to Reproduce

Try to run glab ci lint with the following files:

include: other.yml

main:
  script:
    - echo main
other:
  script:
    - echo other

Logs

$ glab ci lint
Getting contents in .gitlab-ci.yml
Validating...
.gitlab-ci.yml is invalid
1 Local file `other.yml` does not have project!

Your Environment

  • Version used (Run glab --version): glab version 1.22.0 (2022-01-10)
  • Operating System and version: MacOS 10.15.7