Replies: 2 comments 6 replies
-
Here's an old PR that enabled that feature a long time ago: rome/tools#739 We can use it as an example. |
Beta Was this translation helpful? Give feedback.
5 replies
-
I was looking for workflow command for Biome, and ended up in @nikeee 's PR, which looks fascinating. Is there any more things need to be done? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
(re-post of rome/tools#4575)
GitHub actions supports putting annotations in source files during a CI run:
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions
Feature request:
biome ci
should detect if it is running in GitHub actions and emit error/warning messages for linter and style issues.eslint seems to support this as well. It looks like this (for
![image](https://private-user-images.githubusercontent.com/4068864/246215864-36433c5e-0bf2-41eb-bacb-860a66e5cbcf.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzg5NTc4MTksIm5iZiI6MTczODk1NzUxOSwicGF0aCI6Ii80MDY4ODY0LzI0NjIxNTg2NC0zNjQzM2M1ZS0wYmYyLTQxZWItYmFjYi04NjBhNjZlNWNiY2YucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIwNyUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMDdUMTk0NTE5WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZTAzY2I0NTE2ZGJmYWE4YmZjZWNhMzliM2UwYzM4NzljNDE3OGE1NTRmMmZlYmU5M2RkMTIxNDU1NTQ1MTIwMyZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.HZXU5LtX5thWKd5T2q_WcTH1AStmmCy7BsM3apupmOs)
no-unused-vars
):If there is a reliable way to detect if biome is running in GH Actions1, this should be possible to provide without breaking anything. Maybe only consider doing it when using
biome ci
. Eslint seems to do this by default, if it is running in GHA.Some thoughts on that feature:
I was trying to find out where exactly eslint implements this feature, so it can be implemented in a similar way. After some research, I found out that it actually is not part of eslint, but of
setup-node
. The action has a couple of application-specific problem matchers:They rely on the output of the respective tools and match them against some regular expressions.
This might only be an option for tools with a very broad adoption, but in principle, this could be done for biome as well. This would effectively "freeze" the output format of biome, since the problem matchers can't be changed that often.
In my opinion, emitting the workflow commands via biome would be easier and more future-proof. However, we have to
As mentioned in rome/tools#4575, an earlier version of biome had this feature. How was it implemented back then?
Footnotes
Should be possible when checking env var
GITHUB_ACTIONS
fortrue
. ↩Beta Was this translation helpful? Give feedback.
All reactions