Skip to content

farol 0.2.1

Latest

Choose a tag to compare

@erich-oliveira-winnin erich-oliveira-winnin released this 26 Oct 20:33
· 12 commits to main since this release
v0.2.1
4ab9de8
  • PR comment follows the report. Merge risk and verdict in the title, one sentence on where the risk comes from, Must check as a task list, the High and Medium files with their share of the score, and how much new code is tested; the other signals move to a collapsed All signals block. Points match the report: a file's findings are parts of their own (a file no longer shows "risk 34" with its security finding inside).
  • Diff coverage: files left out on purpose are no longer untested. A changed file missing from the coverage report is excluded by the project when the report shows it lists files no test loaded (Vitest coverage.include, coverage.py source, Jest collectCoverageFrom when an unloaded file has top-level code); files that only declare things (types, static constants) have nothing to run. Both, and signals.coverageIgnore files, keep half their risk instead of all of it, and the report lists them apart.
  • Report: syntax highlighting in the diffs (TypeScript/JavaScript, Go, Python, GraphQL) and the whole screen width for the review area; running text keeps a readable width.
  • Social preview image in the new look.
  • Routes with a computed path are no longer safe by default (#6). In Python (FastAPI, Flask), Go and TypeScript REST (Express, Fastify), a route whose path is computed at run time is dynamic-route (the PR is unknown) when the PR adds it or changes the file that registers it: it may take the URL of an existing route. TypeScript REST used to drop such routes; they are now entry points. Untouched ones stay as they were.
  • Go: no toolchain download. go list in the analyzed repository runs with GOTOOLCHAIN=local: a go.mod that needs a newer Go than the installed one makes the analysis unknown with that message, instead of trying to download a toolchain (analyze never uses the network).
  • Example workflows: coverage even when a test fails (--coverage.reportOnFailure): Vitest writes no report after a failing run by default, and farol then counted every changed line as untested.
  • Command-line tools in TypeScript. With "surface": "backend", commander, cac and yargs commands are entry points (CLI analyze), like REST endpoints: a change is ranked by the commands that run it (backend.cli, on by default).
  • farol reviews its own pull requests (.github/workflows/farol.yml), with the action of the pull request itself (read-only) and the coverage of its tests; farol-comment.yml (workflow_run) posts the comment. report takes --since-in / --since-report-url like comment.
  • What farol could not read goes to Must check. An unknown part of the score is checked by hand, never cleared by reviewing a file: a low score with such a part no longer says "likely safe to approve".
npx @winninjs/farol@0.2.1 routes

Live demo: https://winnin.github.io/farol/demo/