ShtukbaseStandard
archivo del paquete→ .shtukbase/packages/live/checks/lib.ts

checks/lib.ts

14 líneas, 756 B.

El archivo tal como está en el paquete: el código y sus comentarios no se traducen.

  1. // Shared part of the live checks: the problems of /base/live.md for one norm, as findings of a rule.
  2. import { type Project, type Result } from '../../collections/checks/lib/speclib.ts';
  3. import { PAGE, readSettings } from '../server/settings.ts';
  4. export { main } from '../../collections/checks/lib/runner.ts';
  5. /** Findings of the norm `rule` (LIVE-R0n) in the settings page; returns the settings for more checks. */
  6. export function settingsFindings(p: Project, res: Result, rule: string, fix: string) {
  7. const s = readSettings(p.root);
  8. res.scope = [PAGE];
  9. res.part('live server settings', null);
  10. for (const x of s.problems.filter((x) => x.includes(`(${rule})`))) res.hole(PAGE, x.replace(` (${rule})`, ''), fix, rule.toLowerCase());
  11. return s;
  12. }