Skip to content

Reports and CI

Yuki edited this page Jul 13, 2026 · 3 revisions

Reports and CI

Output Formats

Supported formats:

  • console
  • json
  • markdown
  • sarif
  • html

Examples:

npx i18n-smell-detector check --format console
npx i18n-smell-detector check --format json
npx i18n-smell-detector check --format markdown --output reports/i18n-smell.md
npx i18n-smell-detector check --format sarif --output reports/i18n-smell.sarif
npx i18n-smell-detector check --format html --output reports/i18n-smell.html

CI Recommendation

Start in reporting mode:

npx i18n-smell-detector check --config i18n-smell.config.mjs --fail-on none

After tuning, enforce high-severity findings:

npx i18n-smell-detector check --config i18n-smell.config.mjs --fail-on high

GitHub Actions Example

name: i18n smell check

on:
  pull_request:
  push:
    branches: [main]

jobs:
  i18n-smell:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v6

      - uses: actions/setup-node@v6
        with:
          node-version: 22

      - run: npm ci

      - name: Run i18n checks
        run: npx i18n-smell-detector check --config i18n-smell.config.mjs --fail-on high

      - name: Write Markdown report
        if: always()
        run: npx i18n-smell-detector check --config i18n-smell.config.mjs --format markdown --output reports/i18n-smell.md --fail-on none

      - name: Write HTML report
        if: always()
        run: npx i18n-smell-detector check --config i18n-smell.config.mjs --format html --output reports/i18n-smell.html --fail-on none

      - uses: actions/upload-artifact@v4
        if: always()
        with:
          name: i18n-smell-report
          path: reports/

SARIF

SARIF output is useful for code scanning systems:

npx i18n-smell-detector check --format sarif --output reports/i18n-smell.sarif --fail-on none

SARIF results include stable issue ids in partialFingerprints.stableId. Hardcoded JSON and SARIF findings also include complete source ranges, AST context, confidence/category, semantic source anchors, and interpolation metadata (rawValue and interpolations) when applicable. Categorized do-not-translate suppression metadata is preserved across structured reports.

HTML

HTML output is intended for artifact review in CI:

npx i18n-smell-detector check --format html --output reports/i18n-smell.html --fail-on none

The HTML report is static and self-contained.

Clone this wiki locally