Skip to content
This repository has been archived by the owner on Dec 7, 2021. It is now read-only.

Latest commit

 

History

History
46 lines (29 loc) · 1.49 KB

PLATO.md

File metadata and controls

46 lines (29 loc) · 1.49 KB

Overview

We're using es6-plato to analyze code complexity. VoTT first has to be transpiled to ES6, as es6-plato won't work direcly on TypeScript.

We're also using the eslint-plugin-react eslint plugin for React-specific linting rules.

Coverage Reports

The VoTT coverage report is updated on each merged PR, to reflect complexity analysis over time.

V1

For posterity, a copy of the V1 coverage report is also available. This report represents a snapshot of the v1 codebase (v1 branch) and can be generated by running:

git checkout v1
npm i plato --no-save
plato -r -d report -t 'VoTT v1 Complexity Analysis' -x 'public/js|test_|main.js' src

Local development

  1. The following command will generate a report directory.

    npm run plato
  2. Open report/index.html in your browser to see the report locally.

Debugging

  1. If npm run plato is not working for you, try running the script manually:

    • Make sure you have typescript & es6-plato installed locally:

      npm install -g typescript
      npm install -g es6-plato
    • Run following command from the root of the repository:

      ./scripts/generate-report.sh -o report -v $(node -pe "require('./package.json').version") -c $(git rev-parse --short HEAD)