Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
1 task done
e965 opened this issue Mar 25, 2025 · 3 comments
Closed
1 task done
Labels
S-Needs repro Status: needs a reproduction

Comments

@e965
Copy link
Contributor

e965 commented Mar 25, 2025

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
@e965 e965 added the S-Needs triage Status: this issue needs to be triaged label Mar 25, 2025
@ematipico ematipico added the S-Needs repro Status: needs a reproduction label Mar 25, 2025
Copy link
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.

@github-actions github-actions bot removed the S-Needs triage Status: this issue needs to be triaged label Mar 25, 2025
@ematipico
Copy link
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.

@e965
Copy link
Contributor Author

e965 commented Mar 25, 2025

@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/
	...
  ...

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-Needs repro Status: needs a reproduction
Projects
None yet
Development

No branches or pull requests

2 participants