Outils de reporting
Depuis la version v1.8.0, la ligne de commande de Biome accepte un argument --reporter
, qui permet de modifier la manière dont les diagnostics et le résumé sont affichés sur le terminal.
Résumé
Section titled Résumébiome check --reporter=summary
Formatter ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━The following files needs to be formatted:main.tsindex.ts
Organize Imports ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━The following files needs to have their imports sorted:main.tsindex.ts
Analyzer ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━Some analyzer rules were triggered
Rule Name Diagnosticslint/suspicious/noImplicitAnyLet 12 (12 error(s), 0 warning(s), 0 info(s))lint/suspicious/noDoubleEquals 8 (8 error(s), 0 warning(s), 0 info(s))lint/suspicious/noRedeclare 12 (12 error(s), 0 warning(s), 0 info(s))lint/suspicious/noDebugger 20 (20 error(s), 0 warning(s), 0 info(s))
Il génère le résumé et les diagnostics au format JSON.
biome ci --reporter=json
JSON pretty
Section titled JSON prettyTout comme --reporter=json
, il génère le résumé et les diagnostics au format JSON, la sortie étant formatée en utilisant les options de formatage de JSON actuelles (fichier de configuration ou réglages par défaut).
biome ci --reporter=json-pretty
GitHub
Section titled GitHubUtilisez cet outil de reporting dans un workflow de GitHub. Une fois cet outil correctement configuré dans le workflow d’une PR, GitHub affichera un message au déclenchement de chaque info/avertissement/erreur.
biome ci --reporter=github
::error title=lint/suspicious/noDoubleEquals,file=main.ts,line=4,endLine=4,col=3,endColumn=5::Use === instead of ==::error title=lint/suspicious/noDebugger,file=main.ts,line=6,endLine=6,col=1,endColumn=9::This is an unexpected use of the debugger statement.::error title=lint/nursery/noEvolvingAny,file=main.ts,line=8,endLine=8,col=5,endColumn=6::This variable's type is not allowed to evolve implicitly, leading to potential any types.
JUnit
Section titled JUnitbiome check --reporter=junit
<?xml version="1.0" encoding="UTF-8"?><testsuites name="Biome" tests="16" failures="16" errors="20" time="<TIME>"> <testsuite name="main.ts" tests="1" disabled="0" errors="0" failures="1" package="org.biome"> <testcase name="org.biome.lint.suspicious.noDoubleEquals" line="4" column="3"> <failure message="Use === instead of ==. == is only allowed when comparing against `null`">line 3, col 2, Use === instead of ==. == is only allowed when comparing against `null`</failure> </testcase> </testsuite> <testsuite name="main.ts" tests="1" disabled="0" errors="0" failures="1" package="org.biome"> <testcase name="org.biome.lint.suspicious.noDebugger" line="6" column="1"> <failure message="This is an unexpected use of the debugger statement.">line 5, col 0, This is an unexpected use of the debugger statement.</failure> </testcase> </testsuite> <testsuite name="main.ts" tests="1" disabled="0" errors="0" failures="1" package="org.biome"> <testcase name="org.biome.lint.nursery.noEvolvingAny" line="8" column="5"> <failure message="This variable's type is not allowed to evolve implicitly, leading to potential any types.">line 7, col 4, This variable's type is not allowed to evolve implicitly, leading to potential any types.</failure> </testcase> </testsuite></testsuites>