Ignore a finding
Ignore a finding that is there on purpose, or change the severity of a code, in contentbit.config.ts, and keep the CI job strict.
Some findings are there on purpose: a site with no x-default alternate, a
path that another app serves on the same domain, a page that is short by
design. Say so in check in the config, and keep the CI gate:
import type { ContentbitConfigInput } from 'contentbit'
export default {
check: {
severity: { CB_SITE_HREFLANG_X_DEFAULT_MISSING: 'off' },
ignore: [
{ code: 'CB_LINK_PAGE_MISSING', targets: '/shop/**', reason: 'Shopify serves the shop.' },
{ code: 'CB_PAGE_BROWSER_RENDERED', pages: '/thanks/', reason: 'Short on purpose.' },
],
},
} satisfies ContentbitConfigInputseveritygives a code another severity, oroffto ignore it everywhere.- An
ignoreentry ignores its codes on somepages, in somefiles, or about sometargets, such as a link's URL. Give each entry areason. Check fields lists every field.
What happens to an ignored finding
- It is counted. The report ends with the number of findings ignored, and
--jsongives it assummary.ignored. - It is gone everywhere.
context,adoptand Studio leave out the same findings, and--strictfails only on the warnings left. - A template finding shrinks. It keeps the pages the settings leave, and still counts once.
- A stale entry shows. An ignore entry that matches no finding is a
CB_CONFIG_IGNORE_UNUSEDwarning.