dts-linter 0.0.0-alpha8 → 0.0.0-alpha9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dts-linter.js +2 -2
- package/package.json +1 -1
package/dist/dts-linter.js
CHANGED
|
@@ -73,5 +73,5 @@ ${JSON.stringify(o,null,4)}`);let f=o;if(ke.string(f.id)||ke.number(f.id)){let g
|
|
|
73
73
|
${ee.message}
|
|
74
74
|
${fc()}`).join(`
|
|
75
75
|
`)),console.log(`${ue.length} of ${R.size} Failed diagnostic checks`)),gs!==R.size&&console.log(`${R.size-gs} of ${R.size} Skipped diagnostic checks`),gs===R.size&&!Z.length&&console.log("All files passed diagnostic checks")),process.exit(Z.length||ue?1:0)}var dc=t=>[t.file,...t.includes.flatMap(e=>dc(e))],rg=async(t,e)=>{let r={textDocument:{uri:`file://${e}`},options:{tabSize:4,insertSpaces:!1,trimTrailingWhitespace:!0}},n=await t.sendRequest("devicetree/formatingDiff",r);if(n)return console.error(`${lc()}[${qn}/${ri}] \u274C ${e}`),console.log(`${n}
|
|
76
|
-
${fc()}`),n;console.log(`[${qn}/${ri}] \u2705 ${e} is correctly formatted.`)},gs=0,ng=async(t,e)=>{gs++;let r=(await t.sendRequest("devicetree/diagnosticIssues",{uri:`file://${e}`})??[]).filter(n=>n.severity===cc.DiagnosticSeverity.Error||n.severity===cc.DiagnosticSeverity.Warning);if(r.length)return console.log(`${lc()}[${qn}/${ri}] \u274C ${e} has ${r.length} diagnostic errors!`),console.log(r.map(n=>`${n.message}: ${JSON.stringify(n.range.start)}${JSON.stringify(n.range.end)}
|
|
77
|
-
|
|
76
|
+
${fc()}`),n;console.log(`[${qn}/${ri}] \u2705 ${e} is correctly formatted.`)},gs=0,ng=async(t,e)=>{gs++;let r=(await t.sendRequest("devicetree/diagnosticIssues",{uri:`file://${e}`})??[]).filter(n=>n.severity===cc.DiagnosticSeverity.Error||n.severity===cc.DiagnosticSeverity.Warning);if(r.length)return console.log(`${lc()}[${qn}/${ri}] \u274C ${e} has ${r.length} diagnostic errors!`),console.log(r.map(n=>`${n.message}: ${JSON.stringify(n.range.start)}${JSON.stringify(n.range.end)}`).join(`
|
|
77
|
+
`)),console.log(fc()),r;console.log(`[${qn}/${ri}] \u2705 ${e} has no diagnostic errors.`)};function ig(t,e=6e4){return new Promise((r,n)=>{let i=setTimeout(()=>{n(new Error("Timed out waiting for devicetree/newActiveContext")),s.dispose()},e),s=t.onNotification("devicetree/newActiveContext",l=>{clearTimeout(i),r(l),s.dispose()})})}function sg(t,e=5e3){return new Promise((r,n)=>{let i=setTimeout(()=>{n(new Error("Timed out waiting for devicetree/contextDeleted")),s.dispose()},e),s=t.onNotification("devicetree/contextDeleted",()=>{clearTimeout(i),r(),s.dispose()})})}
|