Skip to content

🐛 Biome Github Reporter does not work correctly when it is executed in a nested directory #5447

Description

@e965

Environment information

CLI:
  Version:                      2.0.0-beta.1
  Color support:                true

Platform:
  CPU Architecture:             x86_64
  OS:                           linux

Environment:
  BIOME_LOG_PATH:               unset
  BIOME_LOG_PREFIX_NAME:        unset
  BIOME_CONFIG_PATH:            unset
  NO_COLOR:                     unset
  TERM:                         xterm-256color
  JS_RUNTIME_VERSION:           v22.12.0
  JS_RUNTIME_NAME:              node
  NODE_PACKAGE_MANAGER:         yarn/4.7.0

Biome Configuration:
  Status:                       Loaded successfully
  Path:                         **/client/biome.jsonc
  Formatter enabled:            true
  Linter enabled:               true
  Assist enabled:               true
  VCS enabled:                  false

Workspace:
  Open Documents:               0

What happened?

I have a python project where the client application is in the client directory. I want to run the biome ci . --reporter=github command in it (in CI environment). Biome is installed there as a node dependency.

Unfortunately, the reporter does not include the client directory name in the file names, and because of this errors/warnings are not displayed in PR.

I have to use (not very nice) workarounds to run biome from root directory to make it work. But I would like the name of the directory where the project is located to be resolved by default.

::warning title=lint/suspicious/noExplicitAny,file=/src/app/apollo/config/cache.ts,line=16,endLine=16,col=24,endColumn=27::Unexpected any. Specify a different type

Expected result

::warning title=lint/suspicious/noExplicitAny,file=/client/src/app/apollo/config/cache.ts,line=16,endLine=16,col=24,endColumn=27::Unexpected any. Specify a different type

Code of Conduct

  • I agree to follow Biome's Code of Conduct

Activity

  1. added theissue type on Mar 25, 2025
  2. github-actions commented on Mar 25, 2025

    @github-actions
    Contributor

    Hello @e965, please provide a minimal reproduction. You can use one of the following options:

    • Provide a link to our playground, if it's applicable.
    • Provide a link to GitHub repository. To easily create a reproduction, you can use our interactive CLI via npm create @biomejs/biome-reproduction

    Issues marked with S-Needs repro will be closed if they have no activity within 3 days.

  3. ematipico commented on Mar 25, 2025

    @ematipico
    Member

    Few questions:

    • Why should Biome preprend the client/ to the path, even when it's run from inside that folder?
    • What's the structure of the repository? Is client/ the root folder of the project?

    I believe this is a regression of using relative paths instead of absolute paths.

    @Conaclos, you were an advocate for the change. What are your thoughts? Should we revert the change at this point? Using absolute paths in diagnostics seemed OK.

  4. e965 commented on Mar 25, 2025

    @e965
    ContributorAuthor

    @ematipico

    Why should Biome preprend the client/ to the path, even when it's run from inside that folder?

    Biome itself shouldn't, of course. But in the circumstances where we run it with the --reporter=github flag I expect it to adjust to the environment conditions

    What's the structure of the repository? Is client/ the root folder of the project?

    Something like this:

    root/
      some_python_staff1/
    	...
      some_python_staff2/
    	...
      client/
    	package.json
    	biome.jsonc
    	...
      some_python_staff2/
    	...
      ...
    
  5. kaylesworth commented on Jul 17, 2025

    @kaylesworth

    Does this mean there isn't a viable way to report out issues in github actions if we are using a nested directory?

    My current repo is a django monorepo with the frontend nested inside of it

    apps/
    frontend/
    config/
    ...
    

    Where all frontend related files like package.json, biome.json, etc live inside the frontend/ folder. Right now using biome we have no clean way to display errors in github actions. Summary doesn't display errors for lint rules in a way to understand as it collects all failures of the same rules together to display a count, and github reporter breaks since while it outputs it as a list of files and lines, the output is very hard to parse as its meant to be read by github itself to place those errors and warnings in the files changed preview.

    Would it be possible to include some configuration within the reporter or cli to if desired include a prepended path?

  6. nsswaga commented on Oct 8, 2025

    @nsswaga

    Hi, is it possible to reopen this? This should be configurable as to allow showing the absolute path so that it maps to the correct file. The reporter is not as useful if these annotations are not visible in the PR diff itself

  7. ematipico commented on Oct 8, 2025

    @ematipico
    Member

    @nsswaga the issue has been closed because there's no reproduction. Please provide one and we will re-open it

  8. nsswaga commented on Oct 8, 2025

    @nsswaga

    Here's a quick reproduction. The checks errors which are displayed in the workflow run are not visible inline on this PR diff. This is because the file field in the annotations use relative paths, which doesn't get mapped correctly to the files in the PR diff.

  9. added
    S-Needs triageStatus: this issue needs to be triaged
    and removed
    S-Needs reproStatus: needs a reproduction
    on Oct 8, 2025
  10. self-assigned this
    on Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-CLIArea: CLIS-Bug-confirmedStatus: report has been confirmed as a valid bug

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions