arkanalyzer 1.0.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 (322) hide show
  1. package/LICENSE +201 -0
  2. package/README.en.md +88 -0
  3. package/README.md +98 -0
  4. package/docs/HowToCreatePR.md +55 -0
  5. package/docs/HowToHandleIssues.md +155 -0
  6. package/docs/quickstart.pdf +0 -0
  7. package/lib/Config.d.ts +26 -0
  8. package/lib/Config.d.ts.map +1 -0
  9. package/lib/Config.js +128 -0
  10. package/lib/Scene.d.ts +125 -0
  11. package/lib/Scene.d.ts.map +1 -0
  12. package/lib/Scene.js +762 -0
  13. package/lib/callgraph/algorithm/AbstractAnalysis.d.ts +28 -0
  14. package/lib/callgraph/algorithm/AbstractAnalysis.d.ts.map +1 -0
  15. package/lib/callgraph/algorithm/AbstractAnalysis.js +137 -0
  16. package/lib/callgraph/algorithm/ClassHierarchyAnalysis.d.ts +11 -0
  17. package/lib/callgraph/algorithm/ClassHierarchyAnalysis.d.ts.map +1 -0
  18. package/lib/callgraph/algorithm/ClassHierarchyAnalysis.js +71 -0
  19. package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts +16 -0
  20. package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts.map +1 -0
  21. package/lib/callgraph/algorithm/RapidTypeAnalysis.js +147 -0
  22. package/lib/callgraph/common/Statistics.d.ts +58 -0
  23. package/lib/callgraph/common/Statistics.d.ts.map +1 -0
  24. package/lib/callgraph/common/Statistics.js +203 -0
  25. package/lib/callgraph/model/BaseGraph.d.ts +62 -0
  26. package/lib/callgraph/model/BaseGraph.d.ts.map +1 -0
  27. package/lib/callgraph/model/BaseGraph.js +158 -0
  28. package/lib/callgraph/model/CallGraph.d.ts +94 -0
  29. package/lib/callgraph/model/CallGraph.d.ts.map +1 -0
  30. package/lib/callgraph/model/CallGraph.js +339 -0
  31. package/lib/callgraph/model/builder/CallGraphBuilder.d.ts +16 -0
  32. package/lib/callgraph/model/builder/CallGraphBuilder.d.ts.map +1 -0
  33. package/lib/callgraph/model/builder/CallGraphBuilder.js +106 -0
  34. package/lib/callgraph/pointerAnalysis/Context.d.ts +38 -0
  35. package/lib/callgraph/pointerAnalysis/Context.d.ts.map +1 -0
  36. package/lib/callgraph/pointerAnalysis/Context.js +156 -0
  37. package/lib/callgraph/pointerAnalysis/DummyCallCreator.d.ts +23 -0
  38. package/lib/callgraph/pointerAnalysis/DummyCallCreator.d.ts.map +1 -0
  39. package/lib/callgraph/pointerAnalysis/DummyCallCreator.js +104 -0
  40. package/lib/callgraph/pointerAnalysis/Pag.d.ts +209 -0
  41. package/lib/callgraph/pointerAnalysis/Pag.d.ts.map +1 -0
  42. package/lib/callgraph/pointerAnalysis/Pag.js +774 -0
  43. package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts +88 -0
  44. package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts.map +1 -0
  45. package/lib/callgraph/pointerAnalysis/PagBuilder.js +821 -0
  46. package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts +64 -0
  47. package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts.map +1 -0
  48. package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +502 -0
  49. package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.d.ts +9 -0
  50. package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.d.ts.map +1 -0
  51. package/lib/callgraph/pointerAnalysis/PointerAnalysisConfig.js +57 -0
  52. package/lib/callgraph/pointerAnalysis/PtsDS.d.ts +58 -0
  53. package/lib/callgraph/pointerAnalysis/PtsDS.d.ts.map +1 -0
  54. package/lib/callgraph/pointerAnalysis/PtsDS.js +234 -0
  55. package/lib/core/base/Constant.d.ts +17 -0
  56. package/lib/core/base/Constant.d.ts.map +1 -0
  57. package/lib/core/base/Constant.js +53 -0
  58. package/lib/core/base/Decorator.d.ts +15 -0
  59. package/lib/core/base/Decorator.d.ts.map +1 -0
  60. package/lib/core/base/Decorator.js +43 -0
  61. package/lib/core/base/DefUseChain.d.ts +9 -0
  62. package/lib/core/base/DefUseChain.d.ts.map +1 -0
  63. package/lib/core/base/DefUseChain.js +25 -0
  64. package/lib/core/base/Expr.d.ts +219 -0
  65. package/lib/core/base/Expr.d.ts.map +1 -0
  66. package/lib/core/base/Expr.js +896 -0
  67. package/lib/core/base/Local.d.ts +40 -0
  68. package/lib/core/base/Local.d.ts.map +1 -0
  69. package/lib/core/base/Local.js +101 -0
  70. package/lib/core/base/Position.d.ts +39 -0
  71. package/lib/core/base/Position.d.ts.map +1 -0
  72. package/lib/core/base/Position.js +86 -0
  73. package/lib/core/base/Ref.d.ts +75 -0
  74. package/lib/core/base/Ref.d.ts.map +1 -0
  75. package/lib/core/base/Ref.js +286 -0
  76. package/lib/core/base/Stmt.d.ts +109 -0
  77. package/lib/core/base/Stmt.d.ts.map +1 -0
  78. package/lib/core/base/Stmt.js +374 -0
  79. package/lib/core/base/Type.d.ts +220 -0
  80. package/lib/core/base/Type.d.ts.map +1 -0
  81. package/lib/core/base/Type.js +477 -0
  82. package/lib/core/base/Value.d.ts +11 -0
  83. package/lib/core/base/Value.d.ts.map +1 -0
  84. package/lib/core/base/Value.js +16 -0
  85. package/lib/core/common/ArkIRTransformer.d.ts +101 -0
  86. package/lib/core/common/ArkIRTransformer.d.ts.map +1 -0
  87. package/lib/core/common/ArkIRTransformer.js +1674 -0
  88. package/lib/core/common/BodyBuilder.d.ts +10 -0
  89. package/lib/core/common/BodyBuilder.d.ts.map +1 -0
  90. package/lib/core/common/BodyBuilder.js +34 -0
  91. package/lib/core/common/Builtin.d.ts +35 -0
  92. package/lib/core/common/Builtin.d.ts.map +1 -0
  93. package/lib/core/common/Builtin.js +78 -0
  94. package/lib/core/common/CfgBuilder.d.ts +136 -0
  95. package/lib/core/common/CfgBuilder.d.ts.map +1 -0
  96. package/lib/core/common/CfgBuilder.js +1241 -0
  97. package/lib/core/common/Const.d.ts +15 -0
  98. package/lib/core/common/Const.d.ts.map +1 -0
  99. package/lib/core/common/Const.js +34 -0
  100. package/lib/core/common/DummyMainCreater.d.ts +48 -0
  101. package/lib/core/common/DummyMainCreater.d.ts.map +1 -0
  102. package/lib/core/common/DummyMainCreater.js +433 -0
  103. package/lib/core/common/EtsConst.d.ts +65 -0
  104. package/lib/core/common/EtsConst.d.ts.map +1 -0
  105. package/lib/core/common/EtsConst.js +918 -0
  106. package/lib/core/common/ExprUseReplacer.d.ts +18 -0
  107. package/lib/core/common/ExprUseReplacer.d.ts.map +1 -0
  108. package/lib/core/common/ExprUseReplacer.js +88 -0
  109. package/lib/core/common/IRUtils.d.ts +7 -0
  110. package/lib/core/common/IRUtils.d.ts.map +1 -0
  111. package/lib/core/common/IRUtils.js +39 -0
  112. package/lib/core/common/ModelUtils.d.ts +61 -0
  113. package/lib/core/common/ModelUtils.d.ts.map +1 -0
  114. package/lib/core/common/ModelUtils.js +628 -0
  115. package/lib/core/common/RefUseReplacer.d.ts +14 -0
  116. package/lib/core/common/RefUseReplacer.d.ts.map +1 -0
  117. package/lib/core/common/RefUseReplacer.js +50 -0
  118. package/lib/core/common/StmtUseReplacer.d.ts +16 -0
  119. package/lib/core/common/StmtUseReplacer.d.ts.map +1 -0
  120. package/lib/core/common/StmtUseReplacer.js +88 -0
  121. package/lib/core/common/TSConst.d.ts +11 -0
  122. package/lib/core/common/TSConst.d.ts.map +1 -0
  123. package/lib/core/common/TSConst.js +28 -0
  124. package/lib/core/common/TypeInference.d.ts +44 -0
  125. package/lib/core/common/TypeInference.d.ts.map +1 -0
  126. package/lib/core/common/TypeInference.js +519 -0
  127. package/lib/core/common/ValueUtil.d.ts +17 -0
  128. package/lib/core/common/ValueUtil.d.ts.map +1 -0
  129. package/lib/core/common/ValueUtil.js +71 -0
  130. package/lib/core/common/VisibleValue.d.ts +37 -0
  131. package/lib/core/common/VisibleValue.d.ts.map +1 -0
  132. package/lib/core/common/VisibleValue.js +212 -0
  133. package/lib/core/dataflow/DataflowProblem.d.ts +21 -0
  134. package/lib/core/dataflow/DataflowProblem.d.ts.map +1 -0
  135. package/lib/core/dataflow/DataflowProblem.js +33 -0
  136. package/lib/core/dataflow/DataflowResult.d.ts +8 -0
  137. package/lib/core/dataflow/DataflowResult.d.ts.map +1 -0
  138. package/lib/core/dataflow/DataflowResult.js +26 -0
  139. package/lib/core/dataflow/DataflowSolver.d.ts +40 -0
  140. package/lib/core/dataflow/DataflowSolver.d.ts.map +1 -0
  141. package/lib/core/dataflow/DataflowSolver.js +318 -0
  142. package/lib/core/dataflow/Edge.d.ts +16 -0
  143. package/lib/core/dataflow/Edge.d.ts.map +1 -0
  144. package/lib/core/dataflow/Edge.js +40 -0
  145. package/lib/core/dataflow/Fact.d.ts +7 -0
  146. package/lib/core/dataflow/Fact.d.ts.map +1 -0
  147. package/lib/core/dataflow/Fact.js +24 -0
  148. package/lib/core/dataflow/TiantAnalysis.d.ts +37 -0
  149. package/lib/core/dataflow/TiantAnalysis.d.ts.map +1 -0
  150. package/lib/core/dataflow/TiantAnalysis.js +326 -0
  151. package/lib/core/dataflow/UndefinedVariable.d.ts +32 -0
  152. package/lib/core/dataflow/UndefinedVariable.d.ts.map +1 -0
  153. package/lib/core/dataflow/UndefinedVariable.js +235 -0
  154. package/lib/core/dataflow/Util.d.ts +8 -0
  155. package/lib/core/dataflow/Util.d.ts.map +1 -0
  156. package/lib/core/dataflow/Util.js +137 -0
  157. package/lib/core/graph/BasicBlock.d.ts +26 -0
  158. package/lib/core/graph/BasicBlock.d.ts.map +1 -0
  159. package/lib/core/graph/BasicBlock.js +92 -0
  160. package/lib/core/graph/Cfg.d.ts +29 -0
  161. package/lib/core/graph/Cfg.d.ts.map +1 -0
  162. package/lib/core/graph/Cfg.js +154 -0
  163. package/lib/core/graph/DominanceFinder.d.ts +16 -0
  164. package/lib/core/graph/DominanceFinder.d.ts.map +1 -0
  165. package/lib/core/graph/DominanceFinder.js +121 -0
  166. package/lib/core/graph/DominanceTree.d.ts +13 -0
  167. package/lib/core/graph/DominanceTree.d.ts.map +1 -0
  168. package/lib/core/graph/DominanceTree.js +70 -0
  169. package/lib/core/graph/ViewTree.d.ts +115 -0
  170. package/lib/core/graph/ViewTree.d.ts.map +1 -0
  171. package/lib/core/graph/ViewTree.js +16 -0
  172. package/lib/core/graph/builder/ViewTreeBuilder.d.ts +204 -0
  173. package/lib/core/graph/builder/ViewTreeBuilder.d.ts.map +1 -0
  174. package/lib/core/graph/builder/ViewTreeBuilder.js +1046 -0
  175. package/lib/core/model/ArkBody.d.ts +22 -0
  176. package/lib/core/model/ArkBody.d.ts.map +1 -0
  177. package/lib/core/model/ArkBody.js +63 -0
  178. package/lib/core/model/ArkClass.d.ts +110 -0
  179. package/lib/core/model/ArkClass.d.ts.map +1 -0
  180. package/lib/core/model/ArkClass.js +315 -0
  181. package/lib/core/model/ArkExport.d.ts +70 -0
  182. package/lib/core/model/ArkExport.d.ts.map +1 -0
  183. package/lib/core/model/ArkExport.js +143 -0
  184. package/lib/core/model/ArkField.d.ts +60 -0
  185. package/lib/core/model/ArkField.d.ts.map +1 -0
  186. package/lib/core/model/ArkField.js +157 -0
  187. package/lib/core/model/ArkFile.d.ts +62 -0
  188. package/lib/core/model/ArkFile.d.ts.map +1 -0
  189. package/lib/core/model/ArkFile.js +160 -0
  190. package/lib/core/model/ArkImport.d.ts +43 -0
  191. package/lib/core/model/ArkImport.d.ts.map +1 -0
  192. package/lib/core/model/ArkImport.js +109 -0
  193. package/lib/core/model/ArkMethod.d.ts +76 -0
  194. package/lib/core/model/ArkMethod.d.ts.map +1 -0
  195. package/lib/core/model/ArkMethod.js +235 -0
  196. package/lib/core/model/ArkNamespace.d.ts +65 -0
  197. package/lib/core/model/ArkNamespace.d.ts.map +1 -0
  198. package/lib/core/model/ArkNamespace.js +182 -0
  199. package/lib/core/model/ArkSignature.d.ts +98 -0
  200. package/lib/core/model/ArkSignature.d.ts.map +1 -0
  201. package/lib/core/model/ArkSignature.js +281 -0
  202. package/lib/core/model/builder/ArkClassBuilder.d.ts +13 -0
  203. package/lib/core/model/builder/ArkClassBuilder.d.ts.map +1 -0
  204. package/lib/core/model/builder/ArkClassBuilder.js +422 -0
  205. package/lib/core/model/builder/ArkExportBuilder.d.ts +25 -0
  206. package/lib/core/model/builder/ArkExportBuilder.d.ts.map +1 -0
  207. package/lib/core/model/builder/ArkExportBuilder.js +207 -0
  208. package/lib/core/model/builder/ArkFieldBuilder.d.ts +9 -0
  209. package/lib/core/model/builder/ArkFieldBuilder.d.ts.map +1 -0
  210. package/lib/core/model/builder/ArkFieldBuilder.js +189 -0
  211. package/lib/core/model/builder/ArkFileBuilder.d.ts +10 -0
  212. package/lib/core/model/builder/ArkFileBuilder.d.ts.map +1 -0
  213. package/lib/core/model/builder/ArkFileBuilder.js +164 -0
  214. package/lib/core/model/builder/ArkImportBuilder.d.ts +4 -0
  215. package/lib/core/model/builder/ArkImportBuilder.d.ts.map +1 -0
  216. package/lib/core/model/builder/ArkImportBuilder.js +125 -0
  217. package/lib/core/model/builder/ArkMethodBuilder.d.ts +60 -0
  218. package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -0
  219. package/lib/core/model/builder/ArkMethodBuilder.js +419 -0
  220. package/lib/core/model/builder/ArkNamespaceBuilder.d.ts +5 -0
  221. package/lib/core/model/builder/ArkNamespaceBuilder.d.ts.map +1 -0
  222. package/lib/core/model/builder/ArkNamespaceBuilder.js +171 -0
  223. package/lib/core/model/builder/ArkSignatureBuilder.d.ts +9 -0
  224. package/lib/core/model/builder/ArkSignatureBuilder.d.ts.map +1 -0
  225. package/lib/core/model/builder/ArkSignatureBuilder.js +40 -0
  226. package/lib/core/model/builder/builderUtils.d.ts +18 -0
  227. package/lib/core/model/builder/builderUtils.d.ts.map +1 -0
  228. package/lib/core/model/builder/builderUtils.js +449 -0
  229. package/lib/index.d.ts +77 -0
  230. package/lib/index.d.ts.map +1 -0
  231. package/lib/index.js +190 -0
  232. package/lib/save/ArkStream.d.ts +24 -0
  233. package/lib/save/ArkStream.d.ts.map +1 -0
  234. package/lib/save/ArkStream.js +83 -0
  235. package/lib/save/DotPrinter.d.ts +48 -0
  236. package/lib/save/DotPrinter.d.ts.map +1 -0
  237. package/lib/save/DotPrinter.js +229 -0
  238. package/lib/save/GraphPrinter.d.ts +17 -0
  239. package/lib/save/GraphPrinter.d.ts.map +1 -0
  240. package/lib/save/GraphPrinter.js +135 -0
  241. package/lib/save/JsonPrinter.d.ts +28 -0
  242. package/lib/save/JsonPrinter.d.ts.map +1 -0
  243. package/lib/save/JsonPrinter.js +511 -0
  244. package/lib/save/Printer.d.ts +17 -0
  245. package/lib/save/Printer.d.ts.map +1 -0
  246. package/lib/save/Printer.js +27 -0
  247. package/lib/save/PrinterBuilder.d.ts +38 -0
  248. package/lib/save/PrinterBuilder.d.ts.map +1 -0
  249. package/lib/save/PrinterBuilder.js +102 -0
  250. package/lib/save/serializeArkIR.d.ts +3 -0
  251. package/lib/save/serializeArkIR.d.ts.map +1 -0
  252. package/lib/save/serializeArkIR.js +166 -0
  253. package/lib/save/source/SourceBase.d.ts +32 -0
  254. package/lib/save/source/SourceBase.d.ts.map +1 -0
  255. package/lib/save/source/SourceBase.js +93 -0
  256. package/lib/save/source/SourceBody.d.ts +60 -0
  257. package/lib/save/source/SourceBody.d.ts.map +1 -0
  258. package/lib/save/source/SourceBody.js +292 -0
  259. package/lib/save/source/SourceClass.d.ts +27 -0
  260. package/lib/save/source/SourceClass.d.ts.map +1 -0
  261. package/lib/save/source/SourceClass.js +202 -0
  262. package/lib/save/source/SourceField.d.ts +15 -0
  263. package/lib/save/source/SourceField.d.ts.map +1 -0
  264. package/lib/save/source/SourceField.js +68 -0
  265. package/lib/save/source/SourceFilePrinter.d.ts +14 -0
  266. package/lib/save/source/SourceFilePrinter.d.ts.map +1 -0
  267. package/lib/save/source/SourceFilePrinter.js +73 -0
  268. package/lib/save/source/SourceMethod.d.ts +24 -0
  269. package/lib/save/source/SourceMethod.d.ts.map +1 -0
  270. package/lib/save/source/SourceMethod.js +170 -0
  271. package/lib/save/source/SourceModule.d.ts +18 -0
  272. package/lib/save/source/SourceModule.d.ts.map +1 -0
  273. package/lib/save/source/SourceModule.js +120 -0
  274. package/lib/save/source/SourceNamespace.d.ts +13 -0
  275. package/lib/save/source/SourceNamespace.d.ts.map +1 -0
  276. package/lib/save/source/SourceNamespace.js +80 -0
  277. package/lib/save/source/SourceStmt.d.ts +172 -0
  278. package/lib/save/source/SourceStmt.d.ts.map +1 -0
  279. package/lib/save/source/SourceStmt.js +757 -0
  280. package/lib/save/source/SourceTransformer.d.ts +37 -0
  281. package/lib/save/source/SourceTransformer.d.ts.map +1 -0
  282. package/lib/save/source/SourceTransformer.js +338 -0
  283. package/lib/save/source/SourceUtils.d.ts +25 -0
  284. package/lib/save/source/SourceUtils.d.ts.map +1 -0
  285. package/lib/save/source/SourceUtils.js +201 -0
  286. package/lib/transformer/FunctionTransformer.d.ts +3 -0
  287. package/lib/transformer/FunctionTransformer.d.ts.map +1 -0
  288. package/lib/transformer/FunctionTransformer.js +17 -0
  289. package/lib/transformer/SceneTransformer.d.ts +3 -0
  290. package/lib/transformer/SceneTransformer.d.ts.map +1 -0
  291. package/lib/transformer/SceneTransformer.js +17 -0
  292. package/lib/transformer/StaticSingleAssignmentFormer.d.ts +13 -0
  293. package/lib/transformer/StaticSingleAssignmentFormer.d.ts.map +1 -0
  294. package/lib/transformer/StaticSingleAssignmentFormer.js +259 -0
  295. package/lib/transformer/Transformer.d.ts +7 -0
  296. package/lib/transformer/Transformer.d.ts.map +1 -0
  297. package/lib/transformer/Transformer.js +22 -0
  298. package/lib/utils/CfgStructualAnalysis.d.ts +93 -0
  299. package/lib/utils/CfgStructualAnalysis.d.ts.map +1 -0
  300. package/lib/utils/CfgStructualAnalysis.js +955 -0
  301. package/lib/utils/FileUtils.d.ts +18 -0
  302. package/lib/utils/FileUtils.d.ts.map +1 -0
  303. package/lib/utils/FileUtils.js +131 -0
  304. package/lib/utils/callGraphUtils.d.ts +31 -0
  305. package/lib/utils/callGraphUtils.d.ts.map +1 -0
  306. package/lib/utils/callGraphUtils.js +208 -0
  307. package/lib/utils/entryMethodUtils.d.ts +16 -0
  308. package/lib/utils/entryMethodUtils.d.ts.map +1 -0
  309. package/lib/utils/entryMethodUtils.js +139 -0
  310. package/lib/utils/getAllFiles.d.ts +10 -0
  311. package/lib/utils/getAllFiles.d.ts.map +1 -0
  312. package/lib/utils/getAllFiles.js +91 -0
  313. package/lib/utils/json5parser.d.ts +7 -0
  314. package/lib/utils/json5parser.d.ts.map +1 -0
  315. package/lib/utils/json5parser.js +146 -0
  316. package/lib/utils/logger.d.ts +19 -0
  317. package/lib/utils/logger.d.ts.map +1 -0
  318. package/lib/utils/logger.js +90 -0
  319. package/lib/utils/pathTransfer.d.ts +2 -0
  320. package/lib/utils/pathTransfer.d.ts.map +1 -0
  321. package/lib/utils/pathTransfer.js +25 -0
  322. package/package.json +29 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/README.en.md ADDED
@@ -0,0 +1,88 @@
1
+ # sig_programanalysis
2
+
3
+ English | [简体中文](./README.md)
4
+
5
+ ## SIG Group Work Objectives and Scope
6
+
7
+ ### Work Objectives
8
+
9
+ * Sig_programanalysis aims to carry out program analysis technology exploration, key technology identification, and competitiveness building for OpenHarmony systems and apps, striving to become the gathering place for OpenHarmony system and app analysis capabilities and an incubation place for related engineering tools.
10
+
11
+ * Sig_programanalysis will build a basic program analysis framework for OpenHarmony apps, and subsequently based on it to provide application developers with out-of-the-box defect scanning and analysis tools, making it possible to automatically vet code for scenarios such as IDE, CI/CD pipelines, etc.
12
+
13
+ ### Work Scope
14
+
15
+ * Responsible for building and maintaining the key technology map of program analysis, as well as the decomposition of functional modules in the field, interface definition, and maintenance management.
16
+
17
+ * Responsible for the architecture design, open source development, and project maintenance of projects related to program analysis.
18
+
19
+
20
+ ### Projects
21
+
22
+ Sig_programanalysis currently incubates the following projects. Everyone is welcome to participate (you can apply to participate in the co-construction of existing projects, or you can apply to create a new program analysis project).
23
+
24
+
25
+ * ArkAnalyzer:
26
+ The Static Analysis Framework for ArkTS-based OpenHarmony Apps.
27
+
28
+ * ArkCheck:
29
+ Checking OpenHarmony Apps for Potential Code-level Defects
30
+
31
+
32
+ ## SIG Members
33
+
34
+
35
+ ### Leader
36
+
37
+ - [lilicoding](https://gitee.com/lilicoding)
38
+
39
+
40
+ ### Committers
41
+ - [kubigao](https://gitee.com/kubigao)
42
+ - [yifei-xue](https://gitee.com/yifei_xue)
43
+ - [kubrick-hjh](https://gitee.com/kubrick-hjh)
44
+ - [speed9](https://gitee.com/speeds)
45
+ - [bbsun](https://gitee.com/bbsun)
46
+ - [chn](https://gitee.com/chn)
47
+ - [Elouan](https://gitee.com/Elouan)
48
+ - [Rnine](https://gitee.com/Rnine)
49
+ - [workspace_cb](https://gitee.com/workspace_cb)
50
+ - [longyuC](https://gitee.com/longyuC)
51
+ - [xyji95](https://gitee.com/xyji95)
52
+ - [xulingyun-red](https://gitee.com/xulingyun-red)
53
+
54
+
55
+ ### Meetings
56
+ - Meeting Time: Bi-weekly meeting, Thursday 19:30 Beijing time
57
+ - Meeting Application:[Link](https://shimo.im/forms/B1Awd60W7bU51g3m/fill)
58
+ - Meeting Link: Welink or Others
59
+ - Meeting Notification: [Subscribe to](https://lists.openatom.io/postorius/lists/dev.openharmony.io) mailing list dev@openharmony.io for the meeting link
60
+ - Meeting Summary: [Archive link address](https://gitee.com/openharmony-sig/sig-content)
61
+
62
+ ### Contact
63
+
64
+ - Mailing list: [dev@openharmony.io](https://lists.openatom.io/postorius/lists/dev@openharmony.io/)
65
+
66
+ ***
67
+ # ArkAnalyzer: Static Program Analysis Framework for the ArkTS Language
68
+ ## Develope environment setup
69
+ 1. [Download Visual Studio Code](https://code.visualstudio.com/download) or other IDEA;
70
+ 2. [Download Node.js](https://nodejs.org/en/download/current) and install it. Node.js is a runtime environment for JavaScript, which comes with its own package manager, npm.
71
+ 3. Install Typescript via npm:
72
+ ```shell
73
+ npm install -g typescript
74
+ ```
75
+ 4. Install dependency libraries
76
+ ```shell
77
+ cd arkanalyzer
78
+ npm install
79
+ ```
80
+
81
+ ## Commit codes
82
+ Follow the code repository standards of Openharmony-Sig, refer to the [link](docs/HowToCreatePR.md#english)
83
+
84
+ ## Debug
85
+ Modify the `args` parameter array in the debug configuration file `.vscode/launch.json` to the path of the test file you want to debug, and then start the debugging process.
86
+
87
+ ## Add test cases
88
+ Place all new test codes in the `tests` directory. Corresponding sample code and other resource files should be placed in the ``tests\resources` directory, and create different folders for each testing scenario.
package/README.md ADDED
@@ -0,0 +1,98 @@
1
+ # sig_programanalysis
2
+
3
+ 简体中文 | [English](./README.en.md)
4
+
5
+ 说明:本SIG的内容遵循OpenHarmony的PMC管理章程 [README](../../zh/pmc.md)中描述的约定。
6
+
7
+
8
+ ## SIG组工作目标和范围
9
+
10
+
11
+
12
+ ### 工作目标
13
+
14
+ * 程序分析-SIG(Sig_programanalysis) 旨在面向OpenHarmony系统和原生应用开展程序分析技术洞察、关键技术识别和竞争力构建,同时成为OpenHarmony系统和应用程序分析能力的聚集地和相关工程工具的孵化地。
15
+
16
+ * 程序分析-SIG(Sig_programanalysis)将面向OpenHarmony应用构建基础程序分析框架并基于此为应用开发者提供开箱即用的缺陷扫描分析工具,面向IDE、流水线门禁、应用市场上架审核等场景,打造自动化工具看护能力。
17
+
18
+ ### 工作范围
19
+
20
+ * 负责程序分析子领域关键根技术地图梳理,以及领域内功能模块分解、接口定义与维护管理等工作。
21
+
22
+ * 负责程序分析子领域相关项目的架构设计、开源开发和项目维护等工作。
23
+
24
+
25
+ ### 项目孵化
26
+
27
+ 程序分析-SIG(Sig_programanalysis)正积极孵化如下项目,欢迎大家参与共享共建(可申请参与已有项目的共建,也可申请创建新的程序分析项目并联合社区启动开源共建)。
28
+
29
+
30
+ * 方舟分析器(ArkAnalyzer):
31
+ 面向ArkTS的OpenHarmony应用程序分析框架。
32
+
33
+ * 方舟检测器(ArkCheck):
34
+ 面向OpenHarmony应用开发提供代码级缺陷自动检测(I期聚焦高性能编码规则的自动化检测)
35
+
36
+
37
+
38
+ ## SIG组成员
39
+
40
+
41
+ ### Leader
42
+
43
+ - [lilicoding](https://gitee.com/lilicoding)
44
+
45
+
46
+ ### Committers列表
47
+ - [kubigao](https://gitee.com/kubigao)
48
+ - [yifei-xue](https://gitee.com/yifei_xue)
49
+ - [kubrick-hjh](https://gitee.com/kubrick-hjh)
50
+ - [speed9](https://gitee.com/speeds)
51
+ - [bbsun](https://gitee.com/bbsun)
52
+ - [chn](https://gitee.com/chn)
53
+ - [Elouan](https://gitee.com/Elouan)
54
+ - [Rnine](https://gitee.com/Rnine)
55
+ - [workspace_cb](https://gitee.com/workspace_cb)
56
+ - [longyuC](https://gitee.com/longyuC)
57
+ - [xyji95](https://gitee.com/xyji95)
58
+ - [xulingyun-red](https://gitee.com/xulingyun-red)
59
+
60
+
61
+ ### 会议
62
+ - 会议时间:双周例会,周四晚上19:00, UTC+8
63
+ - 会议申报:[申报链接](https://shimo.im/forms/B1Awd60W7bU51g3m/fill)
64
+ - 会议链接:Welink或其他会议
65
+ - 会议通知:请[订阅](https://lists.openatom.io/postorius/lists/dev.openharmony.io)邮件列表 dev@openharmony.io 获取会议链接
66
+ - 会议纪要:[归档链接地址](https://gitee.com/openharmony-sig/sig-content)
67
+
68
+
69
+ ### Contact (optional)
70
+
71
+ - 邮件列表:[dev@openharmony.io](https://lists.openatom.io/postorius/lists/dev@openharmony.io/)
72
+
73
+ ***
74
+
75
+ # 方舟分析器:面向ArkTS语言的静态程序分析框架
76
+ ## ArkAnalyzer 环境配置
77
+ 1. 从[Download Visual Studio Code](https://code.visualstudio.com/download)下载vscode并安装,或安装其他IDE。
78
+ 2. 从[Download Node.js](https://nodejs.org/en/download/current)下载Node.js并安装,Node.js为JavaScript的运行时环境,自带包管理器npm。
79
+ 3. 通过npm安装TypeScript编译器,命令行输入
80
+ ```shell
81
+ npm install -g typescript
82
+ ```
83
+ 4. 安装依赖库
84
+ ```shell
85
+ npm install
86
+ ```
87
+
88
+ ## ArkAnalyzer 代码上库
89
+ 遵守openharmony-sig代码上库规范, 操作方法请参考:[链接](docs/HowToCreatePR.md#中文)
90
+
91
+ ## ArkAnalyzer 调试
92
+ 将调试配置文件`.vscode/launch.json`中`args`参数数组修改为想要调试的文件路径,然后启动调试。
93
+
94
+ ## 添加自验证测试用例
95
+ 新增测试代码统一放至`tests`目录下,对应的样例代码和其他资源文件统一放至`tests\resources`,按测试场景创建不同文件夹。
96
+
97
+ ## ArkAnalyzer Issues
98
+ 请参考[连接](docs/HowToHandleIssues.md)提交Issues。
@@ -0,0 +1,55 @@
1
+ # 中文
2
+ 本指导是对[openharmony-sig提交代码规范](https://gitee.com/openharmony-sig/sig-content/blob/master/Infrastructure/docs/manual/gitee%E6%8F%90pr%E5%B8%B8%E8%A7%84%E6%93%8D%E4%BD%9C.md)的扩充
3
+
4
+ 开发者对仓库修改,统一采用向对应仓库提PR的方式来做修改。提PR的方式有两种:
5
+ 1. fork工作仓方式:相关的gitee操作请参考此[链接](https://gitee.com/help/articles/4128#article-header0)。
6
+ 2. 评审模式:直接向主仓push代码,gitee自动生成PR。相关的操作参考此[链接](https://gitee.com/help/articles/4346)。
7
+
8
+ 以下为一次提交代码的步骤:
9
+ 1. **最重要**:提交代码时一定要记得使用git commit -s -m添加signed-off信息,且signed-off中涉及到的邮箱已经在[链接](https://dco.openharmony.io/sign/Z2l0ZWUlMkZvcGVuX2hhcm1vbnk=)中签署DCO
10
+
11
+ 2. 使用`git push origin <分支名>`将指定分支的本地仓库内容推到远端开发者fork仓库(fork工作仓方式)或远端主仓(评审模式)
12
+
13
+ 3. fork工作仓方式:进入远端fork 的仓库,点击新建PR,选择第2步中提交的分支。评审模式:一个PR会自动创建
14
+
15
+ 4. 在主仓新建ISSUE,ISSUE的类型和内容根据提交的代码特性按实际填写
16
+
17
+ 5. 在PR页面右边栏的“关联ISSUE”选择第4步创建的ISSUE(不关联无法触发门禁)
18
+
19
+ 6. 在PR页面右边栏选择审查人员
20
+
21
+ 7. 在评论中输入`start build`,几秒后会触发门禁
22
+
23
+ 8. 等待门禁后台审核
24
+
25
+ * 如果提交的PR显示DCO检查成功,等待管理员审核通过即可,如果DCO检查失败,请确认是否签署DCO。
26
+
27
+ * 提交以后,后台会进行自动化的法务合规、cicd的扫描,扫描结果会在提交的PR下以评论的形式展现出来
28
+
29
+ * 如果扫描有问题,需要根据反馈进行整改,然后再重新提交,直到审核通过
30
+
31
+ 9. 门禁全部通过和人员审查通过后,会自动合并代码
32
+
33
+ ***
34
+ # ENGLISH
35
+ This guide is an expansion of the code submission standards of openharmony-sig.
36
+
37
+ Developers should make modifications to the repository by submitting a PR (Pull Request) to the corresponding repository. There are two ways to submit a PR:
38
+
39
+ 1. Fork repository method: For related Gitee operations, please refer to this [link](https://gitee.com/help/articles/4128#article-header0).
40
+ 2. Review mode: Directly push the code to the main repository, and Gitee will automatically generate a PR. For related operations, please refer to this [link](https://gitee.com/help/articles/4346).
41
+
42
+ Here are the steps for a code submission:
43
+
44
+ 1. **Most importantly**: When committing code, always remember to use `git commit -s -m` to add signed-off information, and ensure that the email involved in the signed-off has signed the DCO (Developer Certificate of Origin) as [linked](https://dco.openharmony.io/sign/Z2l0ZWUlMkZvcGVuX2hhcm1vbnk=).
45
+ 2. Use `git push origin <branch-name>` to push the content of the specified branch in your local repository to the remote developer's forked repository (fork repository method) or to the remote main repository (review mode).
46
+ 3. Fork repository method: Enter the remote forked repository and click on "New Pull Request", selecting the branch submitted in step 2. Review mode: A PR will be automatically created.
47
+ 4. Create a new ISSUE in the main repository, and fill in the type and content of the ISSUE according to the features of the submitted code.
48
+ 5. On the right side of the PR page, under "Associated ISSUE", select the ISSUE created in step 4 (it cannot trigger the gate if not associated).
49
+ 6. On the right side of the PR page, select the reviewer.
50
+ 7. Enter "start build" in the comments to trigger the gate after a few seconds.
51
+ 8. Wait for the gate to be reviewed in the background.
52
+ * If the submitted PR shows that the DCO check is successful, wait for the administrator to review and pass. If the DCO check fails, please confirm whether you have signed the DCO.
53
+ * After submission, the background will carry out automated legal compliance and CI/CD scanning, and the results of the scan will be displayed in the form of comments under the submitted PR.
54
+ * If there are problems with the scan, they need to be rectified according to the feedback and then resubmitted until the review is passed.
55
+ 9. After all gates pass and the personnel review is passed, the code will be automatically merged.
@@ -0,0 +1,155 @@
1
+ ## 1. Issue 分类
2
+
3
+ 所有新提交的 Issue 应该根据其类型进行分类。主要的分类包括:
4
+
5
+ * Bug
6
+ * 新功能需求
7
+ * 疑问/支持请求
8
+ * 任务
9
+
10
+ ## 2. 初步筛选
11
+
12
+ 当一个新的 Issue 被提交时,项目维护者应执行以下初步筛选步骤:
13
+
14
+ 1. **确认 Issue 描述是否清晰**:确保 Issue 的描述清晰并包含足够的信息。若描述不清晰,向提问者请求更多信息。
15
+ 2. **确认 Issue 分类是否正确**:检查 Issue 的分类是否正确,如果不正确,重新分类。
16
+
17
+ ## 3. 处理流程
18
+
19
+ 根据 Issue 的分类,采取不同的处理流程。
20
+ 各环节需要补充责任人
21
+
22
+ ### A. Bug
23
+
24
+ 1. **验证 Bug**
25
+ * 重现问题:尝试重现提到的问题,若为问题,打上标签跟踪。
26
+ * 收集更多信息:如果需要更多信息(如日志、错误消息、环境配置等),请求提问者提供。
27
+ 2. **优先级排序**
28
+ * 根据 Bug 的严重程度和影响范围,分配优先级。必解问题标为严重,例行跟踪。
29
+ 3. **分配处理**
30
+ * 指派给合适的开发人员进行处理。
31
+ 4. **修复 Bug**
32
+ * 开发人员修复 Bug 并提交 PR。
33
+ 5. **测试和关闭**
34
+ * 测试修复的有效性。
35
+ * 合并 PR 后关闭 Issue,并通知提问者。
36
+
37
+ ### B. 新功能需求
38
+
39
+ 1. **评估需求**
40
+ * 讨论需求的可行性和价值,若有价值录入版本需求。
41
+ * 收集社区和团队的反馈。
42
+ 2. **优先级排序**
43
+ * 根据项目的目标和资源分配优先级。
44
+ 3. **分配处理**
45
+ * 如果决定实施,指派给合适的开发人员进行设计和开发。
46
+ 4. **开发新功能**
47
+ * 开发人员设计、开发并提交 PR。
48
+ 5. **测试和发布**
49
+ * 测试新功能,确保其符合要求。
50
+ * 合并 PR 并更新文档后关闭 Issue,并通知提问者。
51
+
52
+ ### C. 疑问/支持请求
53
+
54
+ 1. **回应提问**
55
+ * 及时回应提问,提供解决方案或指导。
56
+ * 如果问题已在文档中详细说明,提供相关链接。
57
+ 2. **解决疑问**
58
+ * 如果问题复杂,需要进一步讨论和调查,可能需要分配给合适的人员。
59
+ 3. **关闭 Issue**
60
+ * 一旦问题得到解决或指导,关闭 Issue,并通知提问者。
61
+
62
+ ## 4. 通用规范
63
+
64
+ * **响应时间**:尽量在 48 小时内响应新 Issue。
65
+ * **沟通**:保持透明开放的沟通,确保 Issue 创建者了解 Issue 的处理进展。
66
+ * **文档更新**:根据 Issue 处理过程中的发现和解决方案,及时更新项目文档。
67
+ * **定期检查**:定期检查未关闭的 Issue,确保所有问题都得到适当处理。
68
+ * **审核人**: [xulingyun-red](https://gitee.com/xulingyun-red)、[sfoolish](https://gitee.com/sfoolish)。
69
+ * **标题**:标题可以添加tag方便查看,如[#arkcheckxx]、[#IRRefactorxx]。
70
+ * **标签**:
71
+ * `Accept`: 审核通过。
72
+ * `Duplicate`: 重复Issue,注明重复的Issue号,并关闭。
73
+ * `Reject`: 拒绝Issue,注明拒绝理由(e.g. issue描述不清楚,长期未回复)。
74
+
75
+ ## 5. Milestone管理
76
+
77
+ * 每月一个里程碑,里程碑名:M-YYYYMM
78
+ * 月度版本需求和必解问题相关Issue标注Milestone和等级
79
+ * 每月10日锁定当月的必交需求和必解问题,10日后的新增问题单独评估是否必解(遇到周末提前锁定)
80
+ * 每月25日初步锁定下个月的必交需求和必解问题,25日后的新增需求单独评估是否必交(遇到周末提前锁定)
81
+ * 加入Milestone的Issue等级:严重(转测前合入) > 主要(转测后可以合入) > 次要(可以遗留) > 不重要(可以遗留)
82
+
83
+ ## 6. 模板和标签
84
+
85
+ 为帮助开发/测试人员提交有效的 Issue,可以使用模板和标签:
86
+
87
+ ### Issue 模板
88
+
89
+ **1.BUG模版/缺陷**
90
+
91
+ ```
92
+ **【简要描述 / Description】:**
93
+
94
+ **【测试步骤 / Test procedure】:**
95
+
96
+ **【预期结果 / Expected result】:**
97
+
98
+ **【实际结果 / Actual result】:**
99
+
100
+ **【其它 / Others】:**
101
+ - 1. Log、截图、多媒体文件等,所有和问题有关的信息:
102
+
103
+
104
+ e.g.: https://gitee.com/openharmony-sig/arkanalyzer/issues/IAC3AX
105
+ ```
106
+
107
+ **2.需求模版**
108
+
109
+ ```
110
+ **【需求价值 / Value of the Requirement】:**
111
+
112
+ **【需求描述 / Requirement Description】:**
113
+
114
+ **【方案描述 / Solution Description】:**
115
+
116
+ **【配套文档 / Supporting Documentation】:**
117
+
118
+ **【验收标准 / Acceptance Criteria】:**
119
+
120
+ e.g.: https://gitee.com/openharmony-sig/arkanalyzer/issues/IACEBC
121
+ ```
122
+
123
+ **3.任务模版**
124
+
125
+ ```
126
+ **【任务描述 / Task Description】:**
127
+
128
+ **【解决方案 / Solution Description】:**
129
+
130
+ **【任务来源 / Task Source】:**
131
+ ```
132
+
133
+ ## 7. 其它开发过程规范
134
+
135
+ ### A. 分支管理规范
136
+
137
+ * 所有代码必须先合主干,再合商分。(特性分支除外,特性分支代码开发完后,也需要先回合主干再按需合入商分)
138
+ * gitee与codehub同步创建月度Release分支,Release分支匹配Milestone的需求和必解问题交付。
139
+ * 月度首版本转测后,release分支只合必解问题不合需求,不夹带合入。
140
+ * 底座月度分支合入需要[sfoolish](https://gitee.com/sfoolish)审核,影响对外接口的同时需要[yifei-xue](https://gitee.com/yifei_xue)审核,接口文档需要yanglin审核。
141
+
142
+ ### B. PR提交规范
143
+
144
+ * 代码合入前先Rebase
145
+ * 代码PR需要刷新,建议通过`git commit --amend` + `git push -f` 刷新,想在主干保留中间状态,建议分多次PR提交
146
+ * 新建的PR提交后都发到review群里
147
+
148
+ ### C. 代码检视 CheckList
149
+
150
+ 1. PR关联的issue已审核且处于open状态。
151
+ 2. issue描述、PR描述与代码实际修改保持一致。
152
+ 3. 对于一个问题或者需求的提交,不能夹带其它问题或需求的修改。
153
+ 4. 门禁问题和检视意见必须全部处理完毕。
154
+ 5. 代码保持一定比例的注释,确保在充分理解代码修改的情况下对代码进行检视和合入。
155
+ 6. bugfix类PR默认要补充UT用例。
Binary file
@@ -0,0 +1,26 @@
1
+ export interface Sdk {
2
+ name: string;
3
+ path: string;
4
+ moduleName: string;
5
+ }
6
+ export declare class SceneConfig {
7
+ private targetProjectName;
8
+ private targetProjectDirectory;
9
+ private etsSdkPath;
10
+ private sdksObj;
11
+ private sdkFiles;
12
+ private sdkFilesMap;
13
+ private projectFiles;
14
+ constructor();
15
+ buildConfig(targetProjectName: string, targetProjectDirectory: string, sdks: Sdk[], fullFilePath?: string[]): void;
16
+ buildFromProjectDir(targetProjectDirectory: string): void;
17
+ buildFromJson(configJsonPath: string): void;
18
+ getTargetProjectName(): string;
19
+ getTargetProjectDirectory(): string;
20
+ getProjectFiles(): string[];
21
+ getSdkFiles(): string[];
22
+ getSdkFilesMap(): Map<string[], string>;
23
+ getEtsSdkPath(): string;
24
+ getSdksObj(): Sdk[];
25
+ }
26
+ //# sourceMappingURL=Config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["../src/Config.ts"],"names":[],"mappings":"AAsBA,MAAM,WAAW,GAAG;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,WAAW;IACpB,OAAO,CAAC,iBAAiB,CAAc;IACvC,OAAO,CAAC,sBAAsB,CAAc;IAE5C,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,OAAO,CAAa;IAE5B,OAAO,CAAC,QAAQ,CAAgB;IAChC,OAAO,CAAC,WAAW,CAAsD;IAEzE,OAAO,CAAC,YAAY,CAAgB;;IAK7B,WAAW,CACd,iBAAiB,EAAE,MAAM,EACzB,sBAAsB,EAAE,MAAM,EAC9B,IAAI,EAAE,GAAG,EAAE,EACX,YAAY,CAAC,EAAE,MAAM,EAAE;IAUpB,mBAAmB,CAAC,sBAAsB,EAAE,MAAM;IAMlD,aAAa,CAAC,cAAc,EAAE,MAAM;IAuCpC,oBAAoB;IAIpB,yBAAyB;IAIzB,eAAe;IAIf,WAAW;IAIX,cAAc;IAId,aAAa;IAIb,UAAU;CAGpB"}