dts-linter 0.0.0-alpha12 → 0.0.0-alpha13
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
|
@@ -72,6 +72,6 @@ ${JSON.stringify(o,null,4)}`);let f=o;if(ke.string(f.id)||ke.number(f.id)){let g
|
|
|
72
72
|
Issues:
|
|
73
73
|
${te.message}
|
|
74
74
|
${dc()}`).join(`
|
|
75
|
-
`)),console.log(`${de.length} of ${R.size} Failed diagnostic checks`)),ps!==R.size&&console.log(`${R.size-ps} of ${R.size} Skipped diagnostic checks`),ps===R.size&&!Z.length&&console.log("All files passed diagnostic checks")),process.exit(Z.length||de?1:0)}var cc=t=>[t.file,...t.includes.flatMap(e=>cc(e))],rg=async(t,e,r,n)=>{let i={textDocument:{uri:`file://${e}`},options:{tabSize:4,insertSpaces:!1,trimTrailingWhitespace:!0}},s=await t.sendRequest("devicetree/formatingDiff",i),d=r?"":" ";if(s)return console.error(`${
|
|
76
|
-
${dc()}`),s;console.log(`${d}${n} \u2705 ${e} is correctly formatted.`)},ps=0,ng=async(t,e,r,n)=>{ps++;let i=(await t.sendRequest("devicetree/diagnosticIssues",{uri:`file://${e}`})??[]).filter(d=>d.severity===oc.DiagnosticSeverity.Error||d.severity===oc.DiagnosticSeverity.Warning),s=r?"":" ";if(i.length)return console.log(`${
|
|
75
|
+
`)),console.log(`${de.length} of ${R.size} Failed diagnostic checks`)),ps!==R.size&&console.log(`${R.size-ps} of ${R.size} Skipped diagnostic checks`),ps===R.size&&!Z.length&&console.log("All files passed diagnostic checks")),process.exit(Z.length||de?1:0)}var cc=t=>[t.file,...t.includes.flatMap(e=>cc(e))],rg=async(t,e,r,n)=>{let i={textDocument:{uri:`file://${e}`},options:{tabSize:4,insertSpaces:!1,trimTrailingWhitespace:!0}},s=await t.sendRequest("devicetree/formatingDiff",i),d=r?"":" ";if(s)return console.error(`${uc()}${d}${n} \u274C ${e} is not correctly formatted.`),console.log(`${s}
|
|
76
|
+
${dc()}`),s;console.log(`${d}${n} \u2705 ${e} is correctly formatted.`)},ps=0,ng=async(t,e,r,n)=>{ps++;let i=(await t.sendRequest("devicetree/diagnosticIssues",{uri:`file://${e}`})??[]).filter(d=>d.severity===oc.DiagnosticSeverity.Error||d.severity===oc.DiagnosticSeverity.Warning),s=r?"":" ";if(i.length)return console.log(`${uc()}${s}${n} \u274C ${e} has ${i.length} diagnostic errors!`),console.log(i.map(d=>`${s}${d.message}: ${JSON.stringify(d.range.start)}${JSON.stringify(d.range.end)}`).join(`
|
|
77
77
|
`)),console.log(dc()),i;console.log(`${s}${n} \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",d=>{clearTimeout(i),r(d),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()})})}
|