@mocoto/mahoraga 0.14.3 → 0.14.5

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.
Files changed (223) hide show
  1. package/README.md +4 -0
  2. package/dist/analysts/architects/archetypes-custom.js +1 -1
  3. package/dist/analysts/architects/detector-archetypes.js +1 -0
  4. package/dist/analysts/architects/strategist-structure.js +1 -1
  5. package/dist/analysts/azure-pipelines/corrections/correction-azure.js +1 -0
  6. package/dist/analysts/azure-pipelines/detectors/detector-azure-performance.js +1 -0
  7. package/dist/analysts/azure-pipelines/detectors/detector-azure-security.js +1 -0
  8. package/dist/analysts/azure-pipelines/detectors/detector-azure-structure.js +1 -0
  9. package/dist/analysts/azure-pipelines/scorers/scorer-azure.js +1 -0
  10. package/dist/analysts/circleci/detectors/detector-circleci-performance.js +1 -0
  11. package/dist/analysts/circleci/detectors/detector-circleci-security.js +1 -0
  12. package/dist/analysts/circleci/detectors/detector-circleci-structure.js +9 -10
  13. package/dist/analysts/converters/engines/converter-gha-to-gitlab.js +1 -0
  14. package/dist/analysts/corrections/corrector-structure.js +2 -2
  15. package/dist/analysts/corrections/fix-md-fences.js +1 -0
  16. package/dist/analysts/corrections/map-reversion.js +1 -0
  17. package/dist/analysts/corrections/quick-fixes/fix-any-to-proper-type.js +1 -0
  18. package/dist/analysts/corrections/reorganize-barrels.js +1 -0
  19. package/dist/analysts/corrections/scoring-shared.js +1 -0
  20. package/dist/analysts/corrections/type-safety/context-analyzer.js +1 -1
  21. package/dist/analysts/corrections/type-safety/usage-analyzer.js +1 -0
  22. package/dist/analysts/css/analysts/analyst-css.js +3 -2
  23. package/dist/analysts/css/corrections/correction-css.js +1 -0
  24. package/dist/analysts/css/detectors/detector-css-best-practices.js +1 -0
  25. package/dist/analysts/css/scorers/scorer-css.js +1 -0
  26. package/dist/analysts/css-in-js/analysts/analyst-css-in-js.js +1 -0
  27. package/dist/analysts/css-in-js/corrections/correction-css-in-js.js +1 -1
  28. package/dist/analysts/css-in-js/detectors/detector-css-in-js-best-practices.js +2 -2
  29. package/dist/analysts/css-in-js/scorers/scorer-css-in-js.js +2 -2
  30. package/dist/analysts/detectors/detector-bugs-ml.js +4 -2
  31. package/dist/analysts/detectors/detector-dependencies.js +1 -0
  32. package/dist/analysts/detectors/detector-monorepo.js +1 -0
  33. package/dist/analysts/detectors/detector-security.js +1 -1
  34. package/dist/analysts/detectors/detector-structure.js +1 -1
  35. package/dist/analysts/github-actions/corrections/correction-workflow.js +1 -0
  36. package/dist/analysts/github-actions/detectors/detector-dependencies-vulnerable.js +1 -0
  37. package/dist/analysts/github-actions/detectors/detector-workflow-compliance.js +1 -0
  38. package/dist/analysts/github-actions/detectors/detector-workflow-performance.js +1 -0
  39. package/dist/analysts/github-actions/detectors/detector-workflow-security.js +1 -0
  40. package/dist/analysts/github-actions/detectors/detector-workflow-structure.js +1 -0
  41. package/dist/analysts/github-actions/detectors/detector-workflow-trigger-unsafe.js +1 -0
  42. package/dist/analysts/github-actions/scorers/scorer-workflow.js +1 -0
  43. package/dist/analysts/gitlab-ci/analysts/analyst-gitlab-ci.js +1 -0
  44. package/dist/analysts/gitlab-ci/corrections/correction-gitlab-ci.js +1 -0
  45. package/dist/analysts/gitlab-ci/detectors/detector-gitlab-ci-performance.js +1 -0
  46. package/dist/analysts/gitlab-ci/detectors/detector-gitlab-ci-security.js +1 -0
  47. package/dist/analysts/gitlab-ci/detectors/detector-gitlab-ci-structure.js +1 -0
  48. package/dist/analysts/go/analysts/analyst-best-practices.js +1 -0
  49. package/dist/analysts/go/analysts/analyst-concurrency.js +1 -0
  50. package/dist/analysts/go/analysts/analyst-go.js +1 -0
  51. package/dist/analysts/go/analysts/analyst-resources.js +1 -0
  52. package/dist/analysts/go/detectors/detector-conventions.js +1 -0
  53. package/dist/analysts/go/detectors/detector-errors-un-handled.js +1 -0
  54. package/dist/analysts/go/detectors/detector-vulnerabilities.js +1 -0
  55. package/dist/analysts/html/analysts/analyst-html.js +1 -0
  56. package/dist/analysts/html/corrections/correction-html.js +1 -0
  57. package/dist/analysts/html/detectors/detector-html-accessibility.js +1 -0
  58. package/dist/analysts/html/detectors/detector-html.js +1 -0
  59. package/dist/analysts/jenkins/analysts/analyst-jenkins.js +1 -0
  60. package/dist/analysts/jenkins/corrections/correction-jenkins.js +1 -0
  61. package/dist/analysts/jenkins/detectors/detector-jenkins-best-practices.js +1 -0
  62. package/dist/analysts/jenkins/detectors/detector-jenkins-security.js +1 -0
  63. package/dist/analysts/jenkins/scorers/scorer-jenkins.js +1 -0
  64. package/dist/analysts/js-ts/analysts/analyst-todo-comments.js +1 -6
  65. package/dist/analysts/js-ts/detectors/detector-context-smart.js +1 -0
  66. package/dist/analysts/js-ts/detectors/detector-interfaces-inline.js +1 -0
  67. package/dist/analysts/js-ts/detectors/detector-leaks-memory.js +1 -0
  68. package/dist/analysts/js-ts/detectors/detector-types-unsafe.js +88 -5
  69. package/dist/analysts/php/analysts/analyst-php.js +1 -0
  70. package/dist/analysts/php/detectors/detector-php-best-practices.js +1 -0
  71. package/dist/analysts/php/detectors/detector-php-security.js +1 -0
  72. package/dist/analysts/plugins/analyst-formatter.js +1 -0
  73. package/dist/analysts/plugins/detector-markdown.js +1 -0
  74. package/dist/analysts/python/analysts/analyst-python.js +2 -1
  75. package/dist/analysts/python/corrections/correction-python.js +1 -0
  76. package/dist/analysts/python/scorers/scorer-python.js +1 -0
  77. package/dist/analysts/react/analysts/analyst-react-hooks.js +6 -6
  78. package/dist/analysts/react/scorers/scorer-react.js +4 -1
  79. package/dist/analysts/registry/autodiscovery.js +1 -0
  80. package/dist/analysts/rust/analysts/analyst-best-practices.js +1 -0
  81. package/dist/analysts/rust/analysts/analyst-concurrency.js +1 -0
  82. package/dist/analysts/rust/analysts/analyst-memory.js +1 -0
  83. package/dist/analysts/rust/analysts/analyst-rust.js +1 -0
  84. package/dist/analysts/rust/analysts/analyst-security.js +1 -0
  85. package/dist/analysts/rust/detectors/detector-conventions.js +1 -0
  86. package/dist/analysts/rust/detectors/detector-errors-potential.js +1 -0
  87. package/dist/analysts/shell/analysts/analyst-shell.js +1 -0
  88. package/dist/analysts/shell/corrections/correction-shell.js +1 -0
  89. package/dist/analysts/shell/detectors/detector-shell-security.js +1 -0
  90. package/dist/analysts/shell/scorers/scorer-shell.js +1 -0
  91. package/dist/analysts/sql/corrections/correction-sql.js +1 -0
  92. package/dist/analysts/sql/detectors/detector-sql.js +1 -0
  93. package/dist/analysts/sql/scorers/scorer-sql.js +1 -0
  94. package/dist/analysts/strategists/operator-structure.js +1 -1
  95. package/dist/analysts/strategists/suggestions-contextuais.js +1 -0
  96. package/dist/analysts/svg/analysts/analyst-svg.js +1 -0
  97. package/dist/analysts/svg/corrections/correction-svg.js +1 -0
  98. package/dist/analysts/svg/detectors/detector-svg-security.js +1 -0
  99. package/dist/analysts/tailwind/analysts/analyst-tailwind.js +1 -0
  100. package/dist/analysts/tailwind/corrections/correction-tailwind.js +1 -0
  101. package/dist/analysts/tailwind/detectors/detector-tailwind-best-practices.js +1 -0
  102. package/dist/analysts/xml/analysts/analyst-xml.js +1 -0
  103. package/dist/analysts/xml/corrections/correction-xml.js +1 -0
  104. package/dist/analysts/xml/detectors/detector-xml-security.js +1 -0
  105. package/dist/analysts/xml/scorers/scorer-xml.js +1 -0
  106. package/dist/app/github.js +1 -0
  107. package/dist/bin/cli-bootstrap.js +1 -1
  108. package/dist/bin/index.js +1 -1
  109. package/dist/caretakers/caretaker-imports.js +1 -0
  110. package/dist/cli/commands/command-analysts.js +1 -0
  111. package/dist/cli/commands/command-azure.js +1 -0
  112. package/dist/cli/commands/command-barrels.js +1 -0
  113. package/dist/cli/commands/command-circleci.js +1 -0
  114. package/dist/cli/commands/command-compliance.js +1 -0
  115. package/dist/cli/commands/command-convert.js +1 -0
  116. package/dist/cli/commands/command-diagnose.js +1 -1
  117. package/dist/cli/commands/command-fix-types.js +1 -1
  118. package/dist/cli/commands/command-format.js +1 -0
  119. package/dist/cli/commands/command-formatters.js +6 -4
  120. package/dist/cli/commands/command-github-actions.js +1 -0
  121. package/dist/cli/commands/command-gitlab-ci.js +1 -0
  122. package/dist/cli/commands/command-guardian.js +1 -1
  123. package/dist/cli/commands/command-imports.js +1 -0
  124. package/dist/cli/commands/command-jenkins.js +1 -0
  125. package/dist/cli/commands/command-licenses.js +1 -0
  126. package/dist/cli/commands/command-marketplace.js +1 -0
  127. package/dist/cli/commands/command-metrics.js +1 -1
  128. package/dist/cli/commands/command-names.js +1 -0
  129. package/dist/cli/commands/command-optimize-svg.js +1 -0
  130. package/dist/cli/commands/command-perf.js +1 -0
  131. package/dist/cli/commands/command-plugins.js +1 -0
  132. package/dist/cli/commands/command-prune.js +1 -0
  133. package/dist/cli/commands/command-reverter.js +1 -0
  134. package/dist/cli/commands/command-update.js +1 -0
  135. package/dist/cli/diagnostic/auto-fix.js +1 -0
  136. package/dist/cli/diagnostic/exporters/json-exporter.js +1 -0
  137. package/dist/cli/diagnostic/exporters/sharded-exporter.js +1 -1
  138. package/dist/cli/diagnostic/handlers/auto-fix-handler.js +1 -0
  139. package/dist/cli/diagnostic/handlers/guardian-handler.js +1 -0
  140. package/dist/cli/diagnostic/processing-diagnostic.js +1 -0
  141. package/dist/cli/diagnostic/processing-helpers.js +1 -0
  142. package/dist/cli/handlers/command-vulnerabilities.js +1 -0
  143. package/dist/cli/handlers/fix-types-exporter.js +1 -0
  144. package/dist/cli/handlers/guardian-exporter.js +1 -0
  145. package/dist/cli/helpers/display-frame.js +1 -0
  146. package/dist/core/config/auto/validation.js +1 -0
  147. package/dist/core/config/config.js +1 -0
  148. package/dist/core/config/excludes-padrao.js +1 -0
  149. package/dist/core/execution/executor.js +1 -0
  150. package/dist/core/execution/inquisitor.js +1 -0
  151. package/dist/core/formatters/registro-builtin.js +1 -0
  152. package/dist/core/messages/en/analysts/detector-react-messages.js +3 -0
  153. package/dist/core/messages/en/analysts/report-circleci-messages.js +5 -5
  154. package/dist/core/messages/en/cli/cli-command-marketplace-messages.js +1 -0
  155. package/dist/core/messages/en/core/plugin-messages.js +1 -1
  156. package/dist/core/messages/en/log/log-helper.js +1 -1
  157. package/dist/core/messages/en/ui/suggestions.js +1 -1
  158. package/dist/core/messages/ja/analysts/report-circleci-messages.js +5 -5
  159. package/dist/core/messages/ja/core/plugin-messages.js +1 -1
  160. package/dist/core/messages/ja/log/log-helper.js +1 -1
  161. package/dist/core/messages/ja/ui/suggestions.js +1 -1
  162. package/dist/core/messages/pt/analysts/detector-react-messages.js +3 -0
  163. package/dist/core/messages/pt/analysts/report-circleci-messages.js +5 -5
  164. package/dist/core/messages/pt/core/plugin-messages.js +1 -1
  165. package/dist/core/messages/pt/log/log-helper.js +1 -1
  166. package/dist/core/messages/pt/ui/suggestions.js +1 -1
  167. package/dist/core/messages/shared/icons.js +1 -0
  168. package/dist/core/messages/zh/analysts/report-circleci-messages.js +5 -5
  169. package/dist/core/messages/zh/core/plugin-messages.js +1 -1
  170. package/dist/core/messages/zh/log/log-helper.js +1 -1
  171. package/dist/core/messages/zh/ui/suggestions.js +1 -1
  172. package/dist/core/parsing/langs/css.js +1 -0
  173. package/dist/core/parsing/langs/html.js +1 -0
  174. package/dist/core/parsing/langs/json.js +1 -0
  175. package/dist/core/parsing/langs/php.js +1 -0
  176. package/dist/core/parsing/langs/python.js +1 -0
  177. package/dist/core/parsing/langs/rust.js +1 -0
  178. package/dist/core/parsing/langs/scss.js +1 -0
  179. package/dist/core/parsing/langs/shell.js +1 -0
  180. package/dist/core/parsing/langs/vue.js +1 -0
  181. package/dist/core/parsing/parser.js +1 -0
  182. package/dist/core/workers/worker-executor.js +1 -0
  183. package/dist/core/workers/worker-pool.js +0 -0
  184. package/dist/licenses/disclaimer.js +1 -0
  185. package/dist/licenses/generate-notices.js +1 -0
  186. package/dist/licenses/normalizer.js +1 -0
  187. package/dist/licenses/scanner.js +1 -0
  188. package/dist/node.loader.js +1 -0
  189. package/dist/reports/filter-smart.js +1 -1
  190. package/dist/reports/report-archetypes.js +1 -0
  191. package/dist/shared/data-processing/fragment-report.js +1 -0
  192. package/dist/shared/data-processing/json.js +1 -0
  193. package/dist/shared/formatters/engines/prettier.js +1 -0
  194. package/dist/shared/formatters/engines/stylelint.js +1 -0
  195. package/dist/shared/formatters/formatters/code.js +1 -0
  196. package/dist/shared/formatters/formatters/css.js +1 -0
  197. package/dist/shared/formatters/formatters/dockerfile.js +1 -0
  198. package/dist/shared/formatters/formatters/dotfiles.js +1 -0
  199. package/dist/shared/formatters/formatters/go.js +1 -0
  200. package/dist/shared/formatters/formatters/html.js +1 -0
  201. package/dist/shared/formatters/formatters/json.js +1 -0
  202. package/dist/shared/formatters/formatters/markdown.js +1 -0
  203. package/dist/shared/formatters/formatters/shell.js +1 -0
  204. package/dist/shared/formatters/formatters/sql.js +1 -0
  205. package/dist/shared/formatters/formatters/toml.js +1 -0
  206. package/dist/shared/formatters/formatters/xml.js +1 -0
  207. package/dist/shared/formatters/formatters/yaml.js +1 -0
  208. package/dist/shared/helpers/analyst-wrapper.js +1 -0
  209. package/dist/shared/helpers/detectors-common.js +1 -0
  210. package/dist/shared/helpers/framework-detector.js +1 -0
  211. package/dist/shared/helpers/imports.js +1 -1
  212. package/dist/shared/helpers/reader-report.js +1 -0
  213. package/dist/shared/helpers/rule-config.js +1 -0
  214. package/dist/shared/helpers/suppressao.js +1 -0
  215. package/dist/shared/marketplace/remote.js +1 -0
  216. package/dist/shared/persistence/persistence.js +3 -3
  217. package/dist/shared/plugins/registry.js +1 -0
  218. package/dist/types/analysts/css-in-js.js +2 -0
  219. package/dist/types/analysts/index.js +1 -0
  220. package/dist/types/processing/display.js +1 -1
  221. package/dist/types/processing/filters.js +1 -0
  222. package/dist/vulnerabilities/scanner.js +1 -0
  223. package/package.json +1 -1
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import crypto from 'node:crypto';
3
4
  import { promises as fs } from 'node:fs';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { Command } from 'commander';
3
4
  import { messages } from '../../core/messages/index.js';
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { Command } from 'commander';
3
4
  import { chalk, config } from '../../core/config/index.js';
4
5
  import { iniciarInquisicao } from '../../core/execution/index.js';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { Command } from 'commander';
3
4
  import { messages } from '../../core/messages/index.js';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { scanSystemIntegrity } from '../../guardian/index.js';
3
4
  import { Command } from 'commander';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import path from 'node:path';
3
4
  import { config } from '../../core/config/index.js';
@@ -1,5 +1,6 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  // SPDX-FileCopyrightText: 2025 Mahoraga Contributors
3
+ // @mahoraga-disable ml-deep-nesting
3
4
  /**
4
5
  * @module cli/diagnostico/exporters/json-exporter
5
6
  * @description Exportador JSON com suporte a ASCII escape e fragmentação
@@ -1,6 +1,6 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  // SPDX-FileCopyrightText: 2025 Mahoraga Contributors
3
- // @mahoraga-disable tipo-literal-inline-complexo
3
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
4
4
  // Justificativa: tipos locais para manipulação de shards
5
5
  // ─── Função Principal ─────────────────────────────────────────
6
6
  /**
@@ -1,5 +1,6 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  // SPDX-FileCopyrightText: 2025 Mahoraga Contributors
3
+ // @mahoraga-disable ml-deep-nesting
3
4
  /**
4
5
  * @module cli/diagnostico/handlers/auto-fix-handler
5
6
  * @description Handler modular para execução de auto-fix com validação de options
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * [SHIELD] Guardian Handler
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import fs from 'node:fs';
3
4
  import path from 'node:path';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import path from 'node:path';
3
4
  import { config } from '../../core/config/index.js';
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import path from 'node:path';
3
4
  import { scanVulnerabilities } from '../../vulnerabilities/index.js';
4
5
  import { Command } from 'commander';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Handler para exportação de relatórios de fix-types
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Handler para exportação de relatórios do Guardian
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Helper para exibição segura de molduras (blocos formatados)
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Sistema de validação para correções automáticas
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import fs from 'node:fs';
3
4
  import path from 'node:path';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Configuração centralizada dos padrões de exclusão do Mahoraga
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import crypto from 'node:crypto';
3
4
  import path from 'node:path';
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import pLimit from 'p-limit';
3
4
  import * as path from 'path';
4
5
  import { config, isMetaPath } from '../config/index.js';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * @fileoverview Registro dos formatadores built-in (JSON, Markdown, Compliance)
@@ -1,4 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable react-hooks/regra
3
+ // Justificativa: Arquivo de mensagens contém texto "useEffect" em strings de tradução,
4
+ // gerando falso positivo em auto-análise. Não há código executando hooks aqui.
2
5
  export const DetectorReactMensagens = {
3
6
  dangerousHtml: 'dangerouslySetInnerHTML detected - XSS risk',
4
7
  dangerousHtmlSugestao: 'Use DOMPurify or sanitize-html to sanitize content',
@@ -3,16 +3,16 @@ export const RelatorioCircleciMensagens = {
3
3
  tituloPadrao: 'Analysis Report - CircleCI',
4
4
  repositorio: (...args) => `**Repository:** ${String(args[0])}`,
5
5
  data: (...args) => `**Date:** ${String(args[0])}`,
6
- tempo: (...args) => `**Time:** ${args[0]}ms`,
6
+ tempo: (...args) => `**Time:** ${Number(args[0])}ms`,
7
7
  resumo: '## Summary',
8
- scoreGeral: (...args) => `| Overall Score | ${args[0]}/100 |`,
9
- totalConfigs: (...args) => `| Total Configs | ${args[0]} |`,
10
- totalOcorrencias: (...args) => `| Total Occurrences | ${args[0]} |`,
8
+ scoreGeral: (...args) => `| Overall Score | ${Number(args[0])}/100 |`,
9
+ totalConfigs: (...args) => `| Total Configs | ${Number(args[0])} |`,
10
+ totalOcorrencias: (...args) => `| Total Occurrences | ${Number(args[0])} |`,
11
11
  severidade: '## Severity',
12
12
  configsAnalisadas: '## Configs Analyzed',
13
13
  ocorrenciasDetalhadas: '## Detailed Occurrences',
14
14
  geradoPor: '*Generated by Mahoraga v0.7.0*',
15
- formatoNaoSuportado: (...args) => `Unsupported format: ${args[0]}`,
15
+ formatoNaoSuportado: (...args) => `Unsupported format: ${String(args[0])}`,
16
16
  schemaJson: 'mahoraga://schemas/circleci-report/v1',
17
17
  versao: '0.7.0',
18
18
  csvCabecalho: 'File,Line,Severity,Type,Message,Suggestion',
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable react-hooks/regra
2
3
  export const CliComandoMarketplaceMensagens = {
3
4
  descricao: 'Manages the community analysts marketplace',
4
5
  searchDescricao: 'Searches analysts in the marketplace',
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable seguranca vulnerabilidade-seguranca
2
+ // @mahoraga-disable seguranca vulnerabilidade-seguranca react-hooks/regra
3
3
  /**
4
4
  * Plugin Analyst Messages
5
5
  *
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // Justification: inline types for logging system
4
4
  /**
5
5
  * Unified log helper system
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // Justification: inline types for suggestion system
4
4
  /**
5
5
  * Centralized Suggestion and Tips System
@@ -3,16 +3,16 @@ export const RelatorioCircleciMensagens = {
3
3
  tituloPadrao: '分析レポート - CircleCI',
4
4
  repositorio: (...args) => `**リポジトリ:** ${String(args[0])}`,
5
5
  data: (...args) => `**日付:** ${String(args[0])}`,
6
- tempo: (...args) => `**時間:** ${args[0]}ms`,
6
+ tempo: (...args) => `**時間:** ${Number(args[0])}ms`,
7
7
  resumo: '## 概要',
8
- scoreGeral: (...args) => `| 総合スコア | ${args[0]}/100 |`,
9
- totalConfigs: (...args) => `| 設定総数 | ${args[0]} |`,
10
- totalOcorrencias: (...args) => `| 総出現件数 | ${args[0]} |`,
8
+ scoreGeral: (...args) => `| 総合スコア | ${Number(args[0])}/100 |`,
9
+ totalConfigs: (...args) => `| 設定総数 | ${Number(args[0])} |`,
10
+ totalOcorrencias: (...args) => `| 総出現件数 | ${Number(args[0])} |`,
11
11
  severidade: '## 重要度',
12
12
  configsAnalisadas: '## 分析済み設定',
13
13
  ocorrenciasDetalhadas: '## 詳細な出現箇所',
14
14
  geradoPor: '*Mahoraga v0.7.0 により生成*',
15
- formatoNaoSuportado: (...args) => `サポートされていない形式: ${args[0]}`,
15
+ formatoNaoSuportado: (...args) => `サポートされていない形式: ${String(args[0])}`,
16
16
  schemaJson: 'mahoraga://schemas/circleci-report/v1',
17
17
  versao: '0.7.0',
18
18
  csvCabecalho: 'ファイル,行,重要度,タイプ,メッセージ,提案',
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable seguranca vulnerabilidade-seguranca
2
+ // @mahoraga-disable seguranca vulnerabilidade-seguranca react-hooks/regra
3
3
  /**
4
4
  * プラグインアナリストのメッセージ
5
5
  *
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // 正当化: ロギングシステム用のインライン型
4
4
  /**
5
5
  * 統合ログヘルパーシステム
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // 正当化: 提案システム用のインライン型
4
4
  /**
5
5
  * 集中化された提案とヒントのシステム
@@ -1,4 +1,7 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable react-hooks/regra
3
+ // Justificativa: Arquivo de mensagens contém texto "useEffect" em strings de tradução,
4
+ // gerando falso positivo em auto-análise. Não há código executando hooks aqui.
2
5
  export const DetectorReactMensagens = {
3
6
  dangerousHtml: 'dangerouslySetInnerHTML detectado - risco de XSS',
4
7
  dangerousHtmlSugestao: 'Use DOMPurify ou sanitize-html para sanitizar o conteúdo',
@@ -3,16 +3,16 @@ export const RelatorioCircleciMensagens = {
3
3
  tituloPadrao: 'Relatório de Análise - CircleCI',
4
4
  repositorio: (...args) => `**Repositório:** ${String(args[0])}`,
5
5
  data: (...args) => `**Data:** ${String(args[0])}`,
6
- tempo: (...args) => `**Tempo:** ${args[0]}ms`,
6
+ tempo: (...args) => `**Tempo:** ${Number(args[0])}ms`,
7
7
  resumo: '## Resumo',
8
- scoreGeral: (...args) => `| Score Geral | ${args[0]}/100 |`,
9
- totalConfigs: (...args) => `| Total de Configs | ${args[0]} |`,
10
- totalOcorrencias: (...args) => `| Total de Ocorrências | ${args[0]} |`,
8
+ scoreGeral: (...args) => `| Score Geral | ${Number(args[0])}/100 |`,
9
+ totalConfigs: (...args) => `| Total de Configs | ${Number(args[0])} |`,
10
+ totalOcorrencias: (...args) => `| Total de Ocorrências | ${Number(args[0])} |`,
11
11
  severidade: '## Severidade',
12
12
  configsAnalisadas: '## Configs Analisadas',
13
13
  ocorrenciasDetalhadas: '## Ocorrências Detalhadas',
14
14
  geradoPor: '*Gerado por Mahoraga v0.7.0*',
15
- formatoNaoSuportado: (...args) => `Formato não suportado: ${args[0]}`,
15
+ formatoNaoSuportado: (...args) => `Formato não suportado: ${String(args[0])}`,
16
16
  schemaJson: 'mahoraga://schemas/circleci-report/v1',
17
17
  versao: '0.7.0',
18
18
  csvCabecalho: 'Arquivo,Linha,Severidade,Tipo,Mensagem,Sugestao',
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable seguranca vulnerabilidade-seguranca
2
+ // @mahoraga-disable seguranca vulnerabilidade-seguranca react-hooks/regra
3
3
  /**
4
4
  * Mensagens dos Analistas de Plugins
5
5
  *
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // Justificativa: tipos inline para sistema de logs
4
4
  /**
5
5
  * Sistema unificado de helpers de log
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // Justificativa: tipos inline para sistema de sugestões
4
4
  /**
5
5
  * Sistema Centralizado de Sugestões e Dicas
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Sistema Centralizado de Prefixos e Cores ANSI (sem emojis)
@@ -3,16 +3,16 @@ export const RelatorioCircleciMensagens = {
3
3
  tituloPadrao: '分析报告 - CircleCI',
4
4
  repositorio: (...args) => `**仓库:** ${String(args[0])}`,
5
5
  data: (...args) => `**日期:** ${String(args[0])}`,
6
- tempo: (...args) => `**时间:** ${args[0]}ms`,
6
+ tempo: (...args) => `**时间:** ${Number(args[0])}ms`,
7
7
  resumo: '## 摘要',
8
- scoreGeral: (...args) => `| 总体评分 | ${args[0]}/100 |`,
9
- totalConfigs: (...args) => `| 配置总数 | ${args[0]} |`,
10
- totalOcorrencias: (...args) => `| 出现总次数 | ${args[0]} |`,
8
+ scoreGeral: (...args) => `| 总体评分 | ${Number(args[0])}/100 |`,
9
+ totalConfigs: (...args) => `| 配置总数 | ${Number(args[0])} |`,
10
+ totalOcorrencias: (...args) => `| 出现总次数 | ${Number(args[0])} |`,
11
11
  severidade: '## 严重程度',
12
12
  configsAnalisadas: '## 已分析的配置',
13
13
  ocorrenciasDetalhadas: '## 详细出现情况',
14
14
  geradoPor: '*由Mahoraga v0.7.0生成*',
15
- formatoNaoSuportado: (...args) => `不支持的格式: ${args[0]}`,
15
+ formatoNaoSuportado: (...args) => `不支持的格式: ${String(args[0])}`,
16
16
  schemaJson: 'mahoraga://schemas/circleci-report/v1',
17
17
  versao: '0.7.0',
18
18
  csvCabecalho: '文件,行,严重程度,类型,消息,建议',
@@ -1,5 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable seguranca vulnerabilidade-seguranca
2
+ // @mahoraga-disable seguranca vulnerabilidade-seguranca react-hooks/regra
3
3
  /**
4
4
  * 插件分析器消息
5
5
  *
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // Justification: inline types for logging system
4
4
  /**
5
5
  * 统一日志辅助系统
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // Justification: inline types for suggestion system
4
4
  /**
5
5
  * 集中化建议与提示系统
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { wrapMinimal } from '../utils.js';
3
4
  export function parseComCss(codigo) {
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { wrapMinimal } from '../utils.js';
3
4
  /** Analisa código HTML, extrai tags e metadados estruturais */
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { wrapMinimal } from '../utils.js';
3
4
  /** Analisa código JSON, infere tipo, profundidade e estrutura */
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { getCurrentParsingFile, log, logCore, ParserExtraMensagens, wrapMinimal } from '../utils.js';
3
4
  /** Analisa código PHP, extrai classes, funções, namespaces e metadados */
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { getCurrentParsingFile, log, logCore, ParserExtraMensagens, wrapMinimal } from '../utils.js';
3
4
  /** Analisa código Python, extrai classes, funções, imports e decorators */
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { wrapMinimal } from '../utils.js';
3
4
  /** Analisa código Rust, extrai funções, structs, enums, traits e metadados */
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { wrapMinimal } from '../utils.js';
3
4
  import { parseComCss } from './css.js';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { wrapMinimal } from '../utils.js';
3
4
  /** Analisa script Shell, extrai funções, variáveis, exports e estrutura de controle */
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { parse as babelParse } from '@babel/parser';
3
4
  import { wrapMinimal } from '../utils.js';
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { getMessages } from '../messages/index.js';
3
4
  import { getGlobalRegistry, initializeDefaultPlugins } from '../../shared/plugins/index.js';
4
5
  import { parseComBabel, parseComCss, parseComGo, parseComHtmlFunc, parseComJson, parseComMarkdown, parseComPhp, parseComPython, parseComRust, parseComScss, parseComShell, parseComText, parseComTypeScript, parseComVue, parseComXml, parseComYaml, } from './langs/index.js';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Executor de worker para processamento paralelo de arquivos
Binary file
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { execFile as _execFile } from 'node:child_process';
3
4
  import { promises as fs } from 'node:fs';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import { execFile as _execFile } from 'node:child_process';
3
4
  import fs from 'node:fs/promises';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * License normalizer ported from original JS implementation.
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import path from 'node:path';
3
4
  import { checkLicenseStatus, DEFAULT_LICENSE_POLICY, exists, findLicenseFile, normalizeLicense, readPackageJsonSync } from './index.js';
@@ -1,5 +1,6 @@
1
1
  // SPDX-License-Identifier: MIT
2
2
  // Use "npm run sync-aliases" para atualizar os aliases
3
+ // @mahoraga-disable ml-deep-nesting
3
4
  /**
4
5
  * Loader ESM Universal - src/
5
6
  * Resolver autossuficiente com todas as funcionalidades integradas
@@ -1,5 +1,5 @@
1
+ // @mahoraga-disable tipo-literal-inline-complexo ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
- // @mahoraga-disable tipo-literal-inline-complexo
3
3
  // Justificativa: tipos locais para filtragem de relatórios
4
4
  // Sistema inteligente de filtragem e priorização de relatórios
5
5
  // Agrupa problemas similares e prioriza por impacto para evitar sobrecarga de informação
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import path from 'node:path';
3
4
  import { messages } from '../core/messages/index.js';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  import path from 'node:path';
3
4
  import { gzipSync } from 'node:zlib';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Utilidades de JSON: escape Unicode e stringificação segura para consumidores legados.
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import fs from 'node:fs';
3
4
  import { createRequire } from 'node:module';
4
5
  import path from 'node:path';
@@ -1,3 +1,4 @@
1
+ // @mahoraga-disable ml-deep-nesting
1
2
  // SPDX-License-Identifier: MIT
2
3
  /**
3
4
  * Lint de CSS interno do Mahoraga (inspirado em linters de CSS do ecossistema).
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { createRequire } from 'node:module';
3
4
  import { corrigirPontuacaoECodigoConservador, limitarLinhasEmBranco, normalizarFimDeLinha, normalizarNewlinesFinais, normalizarUnicode, removerBom, removerEspacosFinaisPorLinhaComProtecao } from './commons.js';
4
5
  const SPECIAL_TITLES_BY_SYMBOL = {
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
3
4
  function tokenizeCssBlocks(src) {
4
5
  const out = [];
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { limitarLinhasEmBranco, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
3
4
  /* ────────────────────────── Dockerfile Context-Aware Parser ────────────────────────── */
4
5
  const DOCKER_KEYWORDS = new Set([
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { corrigirPontuacaoECodigo, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
3
4
  /* ────────────────────────── Gitignore ────────────────────────── */
4
5
  /**
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { corrigirPontuacaoECodigo, limitarLinhasEmBranco, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
3
4
  function corrigirImportsGo(lines) {
4
5
  const out = [];
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { formatarJavaScriptMinimo } from './code.js';
3
4
  import { corrigirPontuacaoECodigo, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
4
5
  import { formatarCssMinimo } from './css.js';
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { normalizarFimDeLinha, normalizarNewlinesFinais, removerBom, removerEspacosFinaisPorLinha } from './commons.js';
3
4
  /* ────────────────────────── JSON Recovery Helpers ────────────────────────── */
4
5
  function tentarRecuperarJson(input) {
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { corrigirPontuacaoECodigo, normalizarFimDeLinha, normalizarNewlinesFinais, removerEspacosFinaisPorLinha } from './commons.js';
3
4
  export function matchMarkdownFence(line) {
4
5
  const trimmedLeft = line.replace(/^\s+/, '');
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { corrigirPontuacaoECodigo, limitarLinhasEmBranco, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
3
4
  function parseShellLine(raw, ctx) {
4
5
  const trimmed = raw.trimEnd();
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { corrigirPontuacaoECodigo, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
3
4
  /* ────────────────────────── Keywords ────────────────────────── */
4
5
  const SQL_KEYWORDS = new Set(['select', 'from', 'where', 'insert', 'into', 'values', 'update', 'set', 'delete', 'create', 'table', 'drop', 'alter', 'add', 'column', 'index', 'join', 'left', 'right', 'inner', 'outer', 'on', 'and', 'or', 'not', 'in', 'is', 'null', 'as', 'order', 'by', 'group', 'having', 'limit', 'offset', 'union', 'all', 'distinct', 'case', 'when', 'then', 'else', 'end', 'exists', 'between', 'like', 'asc', 'desc', 'primary', 'key', 'foreign', 'references', 'constraint', 'default', 'check', 'unique', 'if', 'begin', 'commit', 'rollback', 'transaction', 'grant', 'revoke', 'with', 'recursive', 'over', 'partition', 'window', 'returning', 'cascade', 'restrict', 'no', 'action', 'using', 'cross', 'natural', 'full', 'replace', 'view', 'trigger', 'function', 'procedure', 'declare', 'fetch', 'cursor', 'open', 'close', 'deallocate']);
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { corrigirPontuacaoECodigo, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom } from './commons.js';
3
4
  function parseTomlLines(code) {
4
5
  const lines = normalizarFimDeLinha(code).split('\n');
@@ -1,4 +1,5 @@
1
1
  // SPDX-License-Identifier: MIT
2
+ // @mahoraga-disable ml-deep-nesting
2
3
  import { corrigirPontuacaoECodigo, normalizarFimDeLinha, normalizarNewlinesFinais, removerBom, removerEspacosFinaisPorLinha } from './commons.js';
3
4
  function tokenizeXml(src) {
4
5
  const re = /(<\?[\s\S]*?\?>|<!--[\s\S]*?-->|<!\[CDATA\[[\s\S]*?\]\]>|<!DOCTYPE[\s\S]*?>|<\/?[^>\n]+?>)/gi;