Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 43 additions & 3 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,52 @@ sonar.exclusions=\
addons/**/webpack.config.js,\
i18n/**/*.json

# Exclude test/generated files from coverage metrics
# Exclude files from coverage metrics that cannot be practically covered by Karma unit tests.
#
# Categories:
# - Test files themselves
# - HTML files (**.html) — while many contain inline <script> with executable Polymer logic,
# Istanbul does not instrument <script> blocks inside HTML via the Karma ESM pipeline;
# only standalone .js modules are instrumented for coverage
# - CSS / JSON / YAML — no executable code
# - Root-level bootstrap files (index.js, legacy.js, public-path.js, sw.js) — app entry points
# and service worker that require a full browser bootstrap context
# - elements/routing.js — runs Page.js route setup at import time, requires Nuxeo.UI app shell
# - elements/elements.js — side-effect import barrel (no exportable logic, just registers elements)
# - i18n/i18n.js — i18n bootstrap loader
# - themes/*.html — covered by **/*.html above; themes/base.js and themes/loader.js have
# unit tests and remain in coverage scope
# - Addon index.js barrel files — side-effect registrations / re-exports
# - nuxeo-spreadsheet/app/ — only files deeply coupled to jQuery/Handsontable/Select2 at import time:
# app.js (imports vendor), lib/ (patches Handsontable prototype), ui/spreadsheet.js (jQuery container),
# ui/editors/ (extend Select2Editor). Testable modules NOT excluded: utils.js, nuxeo/rest/*,
# nuxeo/rpc/*, nuxeo/widget.js, ui/i18n.js, ui/column.js, ui/widgets.js, ui/log.js
# - nuxeo-spreadsheet build config (webpack.config.js, eslint-rules.mjs)
# - nuxeo-platform-3d/ — THREE.js loaders/controls break Karma ESM; elements depend on them
# - .github/ — CI workflow YAML/JS, not application code
sonar.coverage.exclusions=\
**/*.test.js,\
**/*.html,\
**/*.css,\
**/*.yaml,\
**/*.yml,\
i18n/**/*.json
**/*.json,\
index.js,\
legacy.js,\
public-path.js,\
sw.js,\
elements/routing.js,\
elements/elements.js,\
i18n/i18n.js,\
addons/*/index.js,\
addons/nuxeo-spreadsheet/app/app.js,\
addons/nuxeo-spreadsheet/app/lib/**,\
addons/nuxeo-spreadsheet/app/ui/spreadsheet.js,\
addons/nuxeo-spreadsheet/app/ui/editors/**,\
addons/nuxeo-spreadsheet/webpack.config.js,\
addons/nuxeo-spreadsheet/eslint-rules.mjs,\
addons/nuxeo-platform-3d/**,\
.github/**

# Treat test/**/*.test.js and addon test files as test code, not source
sonar.test.inclusions=test/**/*.test.js,addons/*/test/**/*.test.js
Expand All @@ -60,4 +100,4 @@ sonar.sourceEncoding=UTF-8
# TODO: Remove once sub-packages have package-lock.json and npm ci can be used safely.
sonar.issue.ignore.multicriteria=e1
sonar.issue.ignore.multicriteria.e1.ruleKey=*
sonar.issue.ignore.multicriteria.e1.resourceKey=.github/workflows/**
sonar.issue.ignore.multicriteria.e1.resourceKey=.github/workflows/**
Loading