(schema)
| 631 | await forEachFile({ |
| 632 | actionName: 'lint', |
| 633 | async onSchemaFile(schema) { |
| 634 | // This checks to be sure $id is a schemastore.org URL. |
| 635 | // Commenting out because it is overly aggressive for now. |
| 636 | // await assertSchemaHasCorrectMetadata(schema) |
| 637 | await assertTopLevelRefIsStandalone(schema) |
| 638 | // await assertSchemaNoSmartQuotes(schema) |
| 639 | |
| 640 | try { |
| 641 | const errors = schemasafe.lint(schema.json, { |
| 642 | // mode: 'strong', |
| 643 | requireSchema: true, |
| 644 | requireValidation: true, |
| 645 | requireStringValidation: false, |
| 646 | complexityChecks: true, |
| 647 | forbidNoopValues: true, |
| 648 | |
| 649 | extraFormats: false, |
| 650 | schemas: {}, |
| 651 | }) |
| 652 | for (const err of errors) { |
| 653 | console.log(`${schema.name}: ${err.message}`) |
| 654 | } |
| 655 | entries.push({ |
| 656 | count: errors.length, |
| 657 | file: schema.name, |
| 658 | }) |
| 659 | } catch (err) { |
| 660 | console.log(err) |
| 661 | return |
| 662 | } |
| 663 | }, |
| 664 | }) |
| 665 | |
| 666 | entries.sort((a, b) => a.count - b.count) |
nothing calls this directly
no test coverage detected