otk-1c 1.0.0__tar.gz

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 (157) hide show
  1. otk_1c-1.0.0/LICENSE +202 -0
  2. otk_1c-1.0.0/NOTICE +9 -0
  3. otk_1c-1.0.0/PKG-INFO +233 -0
  4. otk_1c-1.0.0/README.md +200 -0
  5. otk_1c-1.0.0/pyproject.toml +93 -0
  6. otk_1c-1.0.0/setup.cfg +4 -0
  7. otk_1c-1.0.0/src/otk_1c/__init__.py +2 -0
  8. otk_1c-1.0.0/src/otk_1c/__main__.py +5 -0
  9. otk_1c-1.0.0/src/otk_1c/analyzers/__init__.py +190 -0
  10. otk_1c-1.0.0/src/otk_1c/analyzers/bsl_analyzer.py +327 -0
  11. otk_1c-1.0.0/src/otk_1c/analyzers/bsl_ls.py +435 -0
  12. otk_1c-1.0.0/src/otk_1c/availability/8.3.27.json +5326 -0
  13. otk_1c-1.0.0/src/otk_1c/availability/8.5.1.json +5362 -0
  14. otk_1c-1.0.0/src/otk_1c/availability/8.5.4.json +5479 -0
  15. otk_1c-1.0.0/src/otk_1c/availability/platform-names.toml +47 -0
  16. otk_1c-1.0.0/src/otk_1c/availability/webclient/8.3.27.json +342 -0
  17. otk_1c-1.0.0/src/otk_1c/availability/webclient/8.5.1.json +342 -0
  18. otk_1c-1.0.0/src/otk_1c/availability/webclient/8.5.4.json +351 -0
  19. otk_1c-1.0.0/src/otk_1c/checks.py +141 -0
  20. otk_1c-1.0.0/src/otk_1c/cli.py +857 -0
  21. otk_1c-1.0.0/src/otk_1c/config.py +217 -0
  22. otk_1c-1.0.0/src/otk_1c/errors.py +10 -0
  23. otk_1c-1.0.0/src/otk_1c/extras/__init__.py +2 -0
  24. otk_1c-1.0.0/src/otk_1c/extras/availability.py +129 -0
  25. otk_1c-1.0.0/src/otk_1c/extras/console.py +414 -0
  26. otk_1c-1.0.0/src/otk_1c/extras/controls.py +1022 -0
  27. otk_1c-1.0.0/src/otk_1c/extras/mcp.py +193 -0
  28. otk_1c-1.0.0/src/otk_1c/extras/scaffold.py +209 -0
  29. otk_1c-1.0.0/src/otk_1c/extras/techlog.py +299 -0
  30. otk_1c-1.0.0/src/otk_1c/gate/__init__.py +1 -0
  31. otk_1c-1.0.0/src/otk_1c/gate/collect.py +244 -0
  32. otk_1c-1.0.0/src/otk_1c/gate/doctor.py +151 -0
  33. otk_1c-1.0.0/src/otk_1c/gate/output.py +16 -0
  34. otk_1c-1.0.0/src/otk_1c/gate/pipeline.py +411 -0
  35. otk_1c-1.0.0/src/otk_1c/gate/platform_api.py +300 -0
  36. otk_1c-1.0.0/src/otk_1c/gate/reasons.py +144 -0
  37. otk_1c-1.0.0/src/otk_1c/gate/report.py +793 -0
  38. otk_1c-1.0.0/src/otk_1c/gate/report_html.py +177 -0
  39. otk_1c-1.0.0/src/otk_1c/gate/resolvers.py +128 -0
  40. otk_1c-1.0.0/src/otk_1c/gate/runner.py +241 -0
  41. otk_1c-1.0.0/src/otk_1c/gate/scenarios.py +137 -0
  42. otk_1c-1.0.0/src/otk_1c/gate/static.py +460 -0
  43. otk_1c-1.0.0/src/otk_1c/gate/vendor.py +384 -0
  44. otk_1c-1.0.0/src/otk_1c/integrations/__init__.py +1 -0
  45. otk_1c-1.0.0/src/otk_1c/integrations/ci.py +117 -0
  46. otk_1c-1.0.0/src/otk_1c/integrations/forgejo_artifacts.py +56 -0
  47. otk_1c-1.0.0/src/otk_1c/integrations/history.py +38 -0
  48. otk_1c-1.0.0/src/otk_1c/integrations/hook.py +159 -0
  49. otk_1c-1.0.0/src/otk_1c/integrations/platform_tools.py +454 -0
  50. otk_1c-1.0.0/src/otk_1c/lang/__init__.py +102 -0
  51. otk_1c-1.0.0/src/otk_1c/lang/en.json +195 -0
  52. otk_1c-1.0.0/src/otk_1c/lang/ru.json +95 -0
  53. otk_1c-1.0.0/src/otk_1c/model.py +140 -0
  54. otk_1c-1.0.0/src/otk_1c/onec/otk_/320/242/320/265/321/201/321/202/321/213/320/237/321/200/320/276/320/261.bsl +115 -0
  55. otk_1c-1.0.0/src/otk_1c/paths.py +12 -0
  56. otk_1c-1.0.0/src/otk_1c/probes/__init__.py +1 -0
  57. otk_1c-1.0.0/src/otk_1c/probes/build.py +327 -0
  58. otk_1c-1.0.0/src/otk_1c/probes/com_extension.py +41 -0
  59. otk_1c-1.0.0/src/otk_1c/probes/designer_check.py +516 -0
  60. otk_1c-1.0.0/src/otk_1c/probes/desktop.py +287 -0
  61. otk_1c-1.0.0/src/otk_1c/probes/edt.py +170 -0
  62. otk_1c-1.0.0/src/otk_1c/probes/executors/__init__.py +28 -0
  63. otk_1c-1.0.0/src/otk_1c/probes/executors/base.py +189 -0
  64. otk_1c-1.0.0/src/otk_1c/probes/executors/com.py +188 -0
  65. otk_1c-1.0.0/src/otk_1c/probes/executors/extended_check.py +441 -0
  66. otk_1c-1.0.0/src/otk_1c/probes/executors/scenarios.py +135 -0
  67. otk_1c-1.0.0/src/otk_1c/probes/executors/yaxunit.py +332 -0
  68. otk_1c-1.0.0/src/otk_1c/probes/ib_tools.py +301 -0
  69. otk_1c-1.0.0/src/otk_1c/probes/iblock.py +94 -0
  70. otk_1c-1.0.0/src/otk_1c/probes/journal.py +21 -0
  71. otk_1c-1.0.0/src/otk_1c/probes/platform.py +466 -0
  72. otk_1c-1.0.0/src/otk_1c/probes/syntax/__init__.py +21 -0
  73. otk_1c-1.0.0/src/otk_1c/probes/syntax/hbk.py +126 -0
  74. otk_1c-1.0.0/src/otk_1c/probes/syntax/index.py +410 -0
  75. otk_1c-1.0.0/src/otk_1c/probes/userbase.py +94 -0
  76. otk_1c-1.0.0/src/otk_1c/schema/designer.schema.json +30 -0
  77. otk_1c-1.0.0/src/otk_1c/schema/doctor-result.schema.json +42 -0
  78. otk_1c-1.0.0/src/otk_1c/schema/gate-result.schema.json +39 -0
  79. otk_1c-1.0.0/src/otk_1c/schema/plan.schema.json +93 -0
  80. otk_1c-1.0.0/src/otk_1c/schema/run.schema.json +34 -0
  81. otk_1c-1.0.0/src/otk_1c/schema/static.schema.json +41 -0
  82. otk_1c-1.0.0/src/otk_1c/schema/summary.schema.json +66 -0
  83. otk_1c-1.0.0/src/otk_1c/sources/__init__.py +1 -0
  84. otk_1c-1.0.0/src/otk_1c/sources/bsl.py +380 -0
  85. otk_1c-1.0.0/src/otk_1c/sources/contexts.py +238 -0
  86. otk_1c-1.0.0/src/otk_1c/sources/dirdiff.py +64 -0
  87. otk_1c-1.0.0/src/otk_1c/sources/gitdiff.py +160 -0
  88. otk_1c-1.0.0/src/otk_1c/sources/index.py +356 -0
  89. otk_1c-1.0.0/src/otk_1c/sources/layout.py +447 -0
  90. otk_1c-1.0.0/src/otk_1c/sources/module_kinds.py +162 -0
  91. otk_1c-1.0.0/src/otk_1c/sources/queries.py +326 -0
  92. otk_1c-1.0.0/src/otk_1c/sources/revision.py +22 -0
  93. otk_1c-1.0.0/src/otk_1c/sources/workspace.py +124 -0
  94. otk_1c-1.0.0/src/otk_1c.egg-info/PKG-INFO +233 -0
  95. otk_1c-1.0.0/src/otk_1c.egg-info/SOURCES.txt +155 -0
  96. otk_1c-1.0.0/src/otk_1c.egg-info/dependency_links.txt +1 -0
  97. otk_1c-1.0.0/src/otk_1c.egg-info/entry_points.txt +2 -0
  98. otk_1c-1.0.0/src/otk_1c.egg-info/requires.txt +5 -0
  99. otk_1c-1.0.0/src/otk_1c.egg-info/top_level.txt +1 -0
  100. otk_1c-1.0.0/tests/test_bsl.py +121 -0
  101. otk_1c-1.0.0/tests/test_bsl_analyzer.py +351 -0
  102. otk_1c-1.0.0/tests/test_bsl_ls.py +342 -0
  103. otk_1c-1.0.0/tests/test_build.py +188 -0
  104. otk_1c-1.0.0/tests/test_checks.py +134 -0
  105. otk_1c-1.0.0/tests/test_ci.py +91 -0
  106. otk_1c-1.0.0/tests/test_cli_only.py +147 -0
  107. otk_1c-1.0.0/tests/test_collect.py +186 -0
  108. otk_1c-1.0.0/tests/test_com.py +49 -0
  109. otk_1c-1.0.0/tests/test_config_ops.py +145 -0
  110. otk_1c-1.0.0/tests/test_console.py +207 -0
  111. otk_1c-1.0.0/tests/test_contexts.py +179 -0
  112. otk_1c-1.0.0/tests/test_contracts.py +289 -0
  113. otk_1c-1.0.0/tests/test_controls_batches.py +237 -0
  114. otk_1c-1.0.0/tests/test_designer_check.py +460 -0
  115. otk_1c-1.0.0/tests/test_dirdiff.py +156 -0
  116. otk_1c-1.0.0/tests/test_edt_controls.py +322 -0
  117. otk_1c-1.0.0/tests/test_edt_designer.py +115 -0
  118. otk_1c-1.0.0/tests/test_edt_extcheck.py +83 -0
  119. otk_1c-1.0.0/tests/test_edt_ib.py +230 -0
  120. otk_1c-1.0.0/tests/test_edt_index.py +217 -0
  121. otk_1c-1.0.0/tests/test_edt_load.py +319 -0
  122. otk_1c-1.0.0/tests/test_edt_materialize.py +40 -0
  123. otk_1c-1.0.0/tests/test_executors.py +117 -0
  124. otk_1c-1.0.0/tests/test_extcheck_forms.py +257 -0
  125. otk_1c-1.0.0/tests/test_extension.py +86 -0
  126. otk_1c-1.0.0/tests/test_forgejo_artifacts.py +84 -0
  127. otk_1c-1.0.0/tests/test_gate_sources.py +125 -0
  128. otk_1c-1.0.0/tests/test_history.py +51 -0
  129. otk_1c-1.0.0/tests/test_hook.py +168 -0
  130. otk_1c-1.0.0/tests/test_ib_tools.py +141 -0
  131. otk_1c-1.0.0/tests/test_iblock.py +76 -0
  132. otk_1c-1.0.0/tests/test_index_cache.py +81 -0
  133. otk_1c-1.0.0/tests/test_lang_platform.py +101 -0
  134. otk_1c-1.0.0/tests/test_layers.py +110 -0
  135. otk_1c-1.0.0/tests/test_layout.py +255 -0
  136. otk_1c-1.0.0/tests/test_module_kinds.py +67 -0
  137. otk_1c-1.0.0/tests/test_outcomes.py +67 -0
  138. otk_1c-1.0.0/tests/test_platform.py +292 -0
  139. otk_1c-1.0.0/tests/test_platform_api.py +281 -0
  140. otk_1c-1.0.0/tests/test_platform_tools.py +102 -0
  141. otk_1c-1.0.0/tests/test_pypi_readme.py +31 -0
  142. otk_1c-1.0.0/tests/test_queries.py +130 -0
  143. otk_1c-1.0.0/tests/test_reasons.py +212 -0
  144. otk_1c-1.0.0/tests/test_report.py +557 -0
  145. otk_1c-1.0.0/tests/test_resolvers.py +129 -0
  146. otk_1c-1.0.0/tests/test_restore_failed.py +147 -0
  147. otk_1c-1.0.0/tests/test_runner_cases.py +49 -0
  148. otk_1c-1.0.0/tests/test_runner_db_config.py +78 -0
  149. otk_1c-1.0.0/tests/test_scaffold.py +104 -0
  150. otk_1c-1.0.0/tests/test_scenarios.py +80 -0
  151. otk_1c-1.0.0/tests/test_smoke.py +110 -0
  152. otk_1c-1.0.0/tests/test_static.py +334 -0
  153. otk_1c-1.0.0/tests/test_syntax.py +178 -0
  154. otk_1c-1.0.0/tests/test_techlog.py +144 -0
  155. otk_1c-1.0.0/tests/test_userbase.py +78 -0
  156. otk_1c-1.0.0/tests/test_vendor.py +164 -0
  157. otk_1c-1.0.0/tests/test_vendor_cases.py +26 -0
otk_1c-1.0.0/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
otk_1c-1.0.0/NOTICE ADDED
@@ -0,0 +1,9 @@
1
+ ОТК (otk-1c) — проверка изменений кода 1С
2
+ Copyright 2026 Ilya Malikov (github.com/Cmapnep)
3
+
4
+ Разработано при участии Claude (Anthropic) — соавтор кода и документации.
5
+ Developed with the assistance of Claude (Anthropic) as a co-author of code and documentation.
6
+
7
+ Licensed under the Apache License, Version 2.0 (see LICENSE).
8
+
9
+ 1С:Предприятие, 1C:EDT — товарные знаки фирмы «1С». ОТК не является продуктом фирмы «1С» и не связан с ней.
otk_1c-1.0.0/PKG-INFO ADDED
@@ -0,0 +1,233 @@
1
+ Metadata-Version: 2.4
2
+ Name: otk-1c
3
+ Version: 1.0.0
4
+ Summary: ОТК: быстрая проверка изменений кода конфигурации 1С перед push/MR
5
+ Author: Ilya Malikov
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://cmapnep-tools.github.io/otk-1c/
8
+ Project-URL: Documentation, https://cmapnep-tools.github.io/otk-1c/
9
+ Project-URL: Source, https://github.com/cmapnep-tools/otk-1c
10
+ Project-URL: Issues, https://github.com/cmapnep-tools/otk-1c/issues
11
+ Project-URL: Changelog, https://github.com/cmapnep-tools/otk-1c/blob/master/CHANGELOG.md
12
+ Keywords: 1c,1c-enterprise,bsl,code-review,pre-push,ci
13
+ Classifier: Development Status :: 4 - Beta
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Natural Language :: Russian
17
+ Classifier: Operating System :: Microsoft :: Windows
18
+ Classifier: Operating System :: POSIX :: Linux
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Classifier: Programming Language :: Python :: 3.13
23
+ Classifier: Programming Language :: Python :: 3.14
24
+ Classifier: Topic :: Software Development :: Quality Assurance
25
+ Classifier: Topic :: Software Development :: Testing
26
+ Requires-Python: >=3.11
27
+ Description-Content-Type: text/markdown
28
+ License-File: LICENSE
29
+ License-File: NOTICE
30
+ Provides-Extra: com
31
+ Requires-Dist: pywin32>=306; sys_platform == "win32" and extra == "com"
32
+ Dynamic: license-file
33
+
34
+ <img src="https://cmapnep-tools.github.io/otk-1c/img/logo.svg" width="128" align="right" alt="">
35
+
36
+ **Русский** | [English](https://github.com/cmapnep-tools/otk-1c/blob/master/README.en.md)
37
+
38
+ # ОТК
39
+
40
+ **Технический контроль изменений кода 1С перед push и в pull request: проверяет только то, что вы изменили,
41
+ средствами самой платформы — за минуты вместо часов — и ловит то, чего не видит проверка Конфигуратором.**
42
+
43
+ ОТК — не ещё один анализатор BSL, а приёмка правки: ответ на вопрос «можно ли отправлять», подтверждённый
44
+ платформой. Изменённые модули компилируются в своих контекстах, запросы разбирает платформа, изменённые формы
45
+ открываются в тонком клиенте, тесты выбираются по изменённым методам. BSL Language Server и bsl-analyzer работают
46
+ внутри ОТК источниками находок — от них берутся только новые замечания по правке.
47
+
48
+ ![otk gate на демо-проекте: статика без базы, затем полная проверка](https://cmapnep-tools.github.io/otk-1c/img/demo.svg)
49
+
50
+ Прогон на ветке `defects` демо-проекта [otk-1c-demo](https://github.com/cmapnep-tools/otk-1c-demo) (ожидание ускорено,
51
+ реальное время — в заголовке окна): статика за секунды находит лишний параметр, потерянный обработчик формы и метод
52
+ новее режима совместимости; пробы в базе добавляют необъявленную переменную, опечатку в поле запроса и ошибку при
53
+ открытии формы. Конфигуратор `/CheckModules` на этой ветке находит только переменную.
54
+
55
+ ## Зачем
56
+
57
+ - **Расширенная проверка всех модулей Конфигуратором на ERP идёт часами (на тестовом ноутбуке около 5 часов)**, на
58
+ отраслевой конфигурации — десятки минут, поэтому перед push её не запускают, а ошибки находят тестировщики,
59
+ ночной CI или пользователи.
60
+ - **Компиляция не видит ошибок в текстах запросов**: опечатка в поле или таблице для неё — строка. Так же проходят
61
+ лишний параметр в вызове экспортного метода и потерянный обработчик события формы.
62
+ - **Форма открывается с ошибкой или зависает** на вопросе пользователю — статическая проверка этого не покажет.
63
+ - **Код, написанный ИИ-ассистентом**, выглядит правдоподобно, но вызывает методы платформы, которых нет, которые
64
+ новее режима совместимости или недоступны на клиенте.
65
+ - **Ревью PR** этого тоже не ловит: глазами не проверить, есть ли поле в регистре и откроется ли форма.
66
+
67
+ Для масштаба: на отраслевой конфигурации (≈ 12 тыс. файлов выгрузки) 20 изменённых модулей ОТК проверяет за
68
+ 1,5–2 минуты.
69
+
70
+ ## ОТК и проверка Конфигуратором
71
+
72
+ | Класс ошибок | `/CheckModules` Конфигуратора | ОТК |
73
+ | --- | --- | --- |
74
+ | Синтаксис, неизвестные переменные и методы, `Справочники.<опечатка>`, предопределённые элементы, формы в `ПолучитьФорму("…")`, удалённый экспортный метод | да, вся конфигурация (с `-ExtendedModulesCheck`) | да, изменённые модули и их вызывающие: статика, пробы компиляции, расширенная проверка изменённого |
75
+ | Поля и таблицы в текстах запросов | нет — для него это строки | разбор платформой, в том числе собранных в коде |
76
+ | Лишний параметр в вызове экспортного метода общего модуля | нет | статика |
77
+ | Обработчик события формы, которого нет в модуле | нет; полная проверка `/CheckConfig -HandlersExistence` — да | статика |
78
+ | Метод платформы новее режима совместимости | только метод более новой линейки (8.5 при режиме 8.3.x) | ошибка — для новой линейки, предупреждение — для своей линейки и конструкторов |
79
+ | Ошибки при открытии формы, зависшая форма | нет | дымовой тест форм |
80
+ | Поведение изменённых методов | нет | тесты [YAxUnit](https://github.com/bia-technologies/yaxunit), выбранные по изменённым методам; заготовки тестов |
81
+ | Новые замечания BSL LS | нет | до/после только по правке, только критические диагностики |
82
+ | Без загруженной базы | нет | статика за секунды (хук загрузки в редакторе, pre-push) |
83
+ | Время | вся конфигурация при любой правке: десятки минут на типовой, часы на ERP | пропорционально правке |
84
+
85
+ Каждая строка об ошибках воспроизводима: [каталог контрольных дефектов](https://cmapnep-tools.github.io/otk-1c/vs-designer/) — заведомые ошибки,
86
+ на которых `otk controls --parity` запускает и ОТК, и Конфигуратор и печатает, кто что поймал; на демо-проекте —
87
+ 3 минуты. Проверку всех модулей Конфигуратором ОТК не отменяет: она остаётся страховкой в CI, а ОТК сверяется с
88
+ ней каталогом контрольных дефектов. Эталоны, замеры и условия — [docs/comparison.md](https://cmapnep-tools.github.io/otk-1c/comparison/);
89
+ две недели в CI настоящего проекта рядом с Конфигуратором — [docs/pilot.md](https://cmapnep-tools.github.io/otk-1c/pilot/).
90
+
91
+ ## ОТК и анализаторы BSL
92
+
93
+ | Что ловит | BSL LS | bsl-analyzer | ОТК |
94
+ | --- | --- | --- | --- |
95
+ | Синтаксическая ошибка | да | да | да (анализатор, пробы) |
96
+ | Несуществующий метод модуля, лишний параметр, неизвестное поле | нет | да (предупреждение) | да (статика) |
97
+ | Поле или таблица запроса | нет | да (предупреждение) | да (запрос в базе) |
98
+ | Метод недоступен на клиенте или в веб-клиенте | нет | да (предупреждение) | да (статика, extcheck) |
99
+ | Функция без `Возврат` на ветке, модальный вызов | частично | да | через анализатор |
100
+ | Необъявленная переменная, ошибки открытия формы, зависание | нет | нет | да (пробы, дымовой тест) |
101
+ | Только новое по правке | нет | нет | да (до/после) |
102
+
103
+ Анализатор (`environment.analyzer`: BSL LS, bsl-analyzer или оба) — источник находок проверки `analyzers`: чем он
104
+ лучше, тем сильнее ОТК. На 28 контрольных дефектах BSL LS поймал 7, bsl-analyzer — 19, статика ОТК без
105
+ анализаторов — 17; запросы в базе, необъявленную переменную и формы ловят только пробы
106
+ ([docs/vs-analyzers.md](https://cmapnep-tools.github.io/otk-1c/vs-analyzers/)).
107
+
108
+ ## Возможности
109
+
110
+ - **Только изменённое** — план проверки по `git diff` или сравнению двух каталогов выгрузки; модули, вызывающие
111
+ изменённые экспортные методы, тоже проверяются.
112
+ - **Ступени по стоимости** — статика без базы (секунды) → пробы компиляции и запросов в копии ИБ → расширенная
113
+ проверка изменённых модулей Конфигуратором → дымовой тест форм → сценарные тесты.
114
+ - **Работает с тем, что есть** — каждая проверка `on` / `auto` / `off`; чего нет на машине (YAxUnit, BSL LS, COM),
115
+ то помечается «не проверено» с причиной, а не «зелёным». `otk doctor` покажет, что теряется.
116
+ - **Конфигурации и расширения**, выгрузка Конфигуратора и проект 1C:EDT, русский и английский встроенный язык.
117
+ - **Своя копия ИБ или рабочая база** — проверка в базе разработчика с возвратом её к прежнему виду.
118
+ - **Результат там, где вы работаете** — сводка Markdown/HTML с местом каждой ошибки, JUnit, SARIF, панель
119
+ Problems VS Code; коды выхода 0 / 1 / 2 (чисто / ошибки / сбой окружения).
120
+ - **Хуки** — git pre-push и загрузка в базу из VS Code «1C: Platform Tools».
121
+ - **CI** — шаблоны Forgejo/Gitea Actions, GitHub Actions, GitLab CI, Jenkins, базовая линия проверки всех модулей для типовых конфигураций (красными
122
+ становятся только новые ошибки).
123
+ - **Для ИИ-агентов** — проверка после каждой правки агента: `otk gate --base HEAD --worktree` с кодом выхода, строками
124
+ «файл(строка)» и `summary.json` ([сценарий и правило для агента](https://cmapnep-tools.github.io/otk-1c/agents/)); MCP-сервер с консолью копии
125
+ ИБ: запросы только на чтение, метаданные, журнал регистрации, анализ технологического журнала.
126
+ - **Без облака и телеметрии** — код никуда не уходит, всё выполняется на вашей машине.
127
+
128
+ ## Требования
129
+
130
+ - Windows или Linux (на Linux — всё, кроме внешнего соединения через COM; Xvfb для окон 1С — [docs/linux.md](https://cmapnep-tools.github.io/otk-1c/linux/)),
131
+ платформа 1С:Предприятие 8.3.2x / 8.5 (Конфигуратор, тонкий клиент; `ibcmd` из компонентов сервера ускоряет
132
+ полную загрузку, без него — Конфигуратором);
133
+ - Python 3.11+ (стандартная библиотека; для проб через COM на Windows — `pywin32`: `pip install "otk-1c[com]"`);
134
+ - git (или две выгрузки «было» и «стало»); исходники — выгрузка Конфигуратора (`Configuration.xml` в корне) или
135
+ проект 1C:EDT ([docs/edt.md](https://cmapnep-tools.github.io/otk-1c/edt/));
136
+ - для проб — **своя файловая копия ИБ** проекта (ОТК загружает в неё изменения) или рабочая база;
137
+ - по желанию: расширение YAxUnit (`.cfe`) — тонкий клиент, формы, сценарии; BSL Language Server или bsl-analyzer.
138
+ Без них ОТК работает, а недоступные проверки отмечает «не проверено». Справку платформы для проверки методов
139
+ ОТК индексирует сам из установленной платформы.
140
+
141
+ **Лицензия 1С.** Статика (`--static-only`) работает без лицензии и без запуска платформы — в контейнере и на
142
+ облачных раннерах CI. Пробы в копии ИБ запускают клиентские приложения 1С и требуют клиентскую лицензию; лицензия
143
+ для разработчиков (community) подходит только для некоммерческого использования и требует еженедельного выхода в
144
+ интернет; ОТК разработан и проверен под ней. Подробно, с ограничениями для CI, — [docs/licensing.md](https://cmapnep-tools.github.io/otk-1c/licensing/).
145
+
146
+ ## Быстрый старт
147
+
148
+ Без установки и настроек — из скачанного каталога, всё аргументами:
149
+
150
+ ```
151
+ <otk>\otk.cmd gate --dir <выгрузка> # Windows; Linux, Git Bash — otk.sh
152
+ <otk>\otk.cmd doctor --dir <выгрузка> # что доступно на этой машине
153
+ ```
154
+
155
+ С установкой и настройками проекта:
156
+
157
+ ```
158
+ pip install otk-1c # или из клона: PYTHONPATH=<otk>/src
159
+ cd <репозиторий проекта 1С>
160
+ copy <otk>\otk.example.toml otk.toml # настройки проекта (в git)
161
+ notepad otk.local.toml # пути этой машины (вне git)
162
+ otk gate --base origin/master --static-only # статика без базы: секунды
163
+ otk gate --base origin/master # полная проверка ветки относительно master
164
+ ```
165
+
166
+ `otk.local.toml` — минимум:
167
+
168
+ ```toml
169
+ [environment]
170
+ ib = "C:/otk/ib/проект" # своя копия ИБ
171
+ user = "Администратор" # пользователь копии (пароль — password)
172
+ yaxunit = "C:/otk/YAxUnit.cfe"
173
+ ```
174
+
175
+ Платформа (самая новая установленная — «для компьютера» в `Program Files\1cv8` или «для пользователя» в
176
+ `%LOCALAPPDATA%\Programs\1cv8_x64`, `1cv8_x86`; на Linux — `/opt/1cv8/<arch>`), ProgID COM-соединителя и BSL LS (`OTK_BSLLS`, `PATH` или копия расширения VS Code «Language 1C (BSL)») находятся
177
+ сами; найденный каталог показывает `otk doctor`.
178
+ Хук pre-push — `otk hook install`.
179
+
180
+ ## Документация
181
+
182
+ Те же страницы — на [сайте документации](https://cmapnep-tools.github.io/otk-1c/) с поиском.
183
+
184
+ | | |
185
+ | --- | --- |
186
+ | [Команды и запуск без настроек](https://cmapnep-tools.github.io/otk-1c/commands/) | все команды, ключи `gate`, проверка без git и доработок относительно поставщика (`--vendor`) |
187
+ | [Настройки](https://cmapnep-tools.github.io/otk-1c/configuration/) | `otk.toml` / `otk.local.toml`, проект-расширение; [образец](https://github.com/cmapnep-tools/otk-1c/blob/master/otk.example.toml) |
188
+ | [Проверки](https://cmapnep-tools.github.io/otk-1c/checks/) | что делает каждая проверка и что нужно для неё, анализаторы BSL, сценарные тесты, дымовой тест форм |
189
+ | [Сводка и коды выхода](https://cmapnep-tools.github.io/otk-1c/report/) | форматы результата, SARIF; правила находок — [справочник](https://cmapnep-tools.github.io/otk-1c/findings/) |
190
+ | [Интеграции](https://cmapnep-tools.github.io/otk-1c/integrations/) | хук pre-push, рабочая база вместо копии, VS Code «1C: Platform Tools» |
191
+ | [ИИ-агенты](https://cmapnep-tools.github.io/otk-1c/agents/) | проверка после правки агента: команды, код выхода, `summary.json`, правило для `AGENTS.md` |
192
+ | [Контракт](https://cmapnep-tools.github.io/otk-1c/contract/) | что стабильно в 1.x: команды, коды выхода, настройки, `OTK_*`, файлы JSON и их схемы |
193
+ | [CI](https://cmapnep-tools.github.io/otk-1c/ci/) | шаблоны GitHub Actions, GitLab CI, Jenkins, Forgejo/Gitea; что ОТК заменяет в вашем CI; базовая линия проверки всех модулей |
194
+ | [Лицензии 1С](https://cmapnep-tools.github.io/otk-1c/licensing/) | что работает без лицензии, лицензия для разработчиков и её ограничения |
195
+ | [Сторонние инструменты](https://cmapnep-tools.github.io/otk-1c/third-party/) | что ОТК запускает, их лицензии и проверенные версии; заимствованные идеи |
196
+ | [Формат EDT](https://cmapnep-tools.github.io/otk-1c/edt/) | проекты 1C:EDT |
197
+ | [Linux](https://cmapnep-tools.github.io/otk-1c/linux/) | установка платформы, лицензия для разработчиков, Xvfb, отличия от Windows |
198
+ | [Дополнительные инструменты](https://cmapnep-tools.github.io/otk-1c/tools/) | консоль копии ИБ и MCP-сервер, анализ технологического журнала |
199
+ | [Известные пределы](https://cmapnep-tools.github.io/otk-1c/limits/) | что не проверяется и почему |
200
+ | [Устранение неполадок](https://cmapnep-tools.github.io/otk-1c/troubleshooting/) | база занята, нет COM, окно клиента не видно |
201
+ | [Сравнение](https://cmapnep-tools.github.io/otk-1c/comparison/) | ОТК, Конфигуратор и анализаторы BSL: эталоны и замеры |
202
+ | [Пилот](https://cmapnep-tools.github.io/otk-1c/pilot/) | две недели на реальных задачах: пропуски, ложные срабатывания, время; дозамер новых возможностей |
203
+ | [Разработка](https://cmapnep-tools.github.io/otk-1c/development/) | OpenSpec, своя проверка, тесты |
204
+
205
+ ## Участие
206
+
207
+ Ошибки, ложные срабатывания, пропуски и предложения — задачей по форме (к ошибке приложите вывод `otk doctor` и
208
+ `summary.json`). Как прислать изменение — [CONTRIBUTING.md](https://github.com/cmapnep-tools/otk-1c/blob/master/CONTRIBUTING.md), что изменилось — [CHANGELOG.md](https://github.com/cmapnep-tools/otk-1c/blob/master/CHANGELOG.md).
209
+
210
+ ## Благодарности
211
+
212
+ ОТК опирается на работу сообщества. Спасибо авторам:
213
+
214
+ - [BSL Language Server](https://github.com/1c-syntax/bsl-language-server) (Никита Федькин) — анализатор BSL,
215
+ источник находок проверки `analyzers`;
216
+ - [bsl-analyzer](https://github.com/itrous/bsl-analyzer) (Кирилл Елишев) — второй анализатор той же проверки, по
217
+ модели всей конфигурации;
218
+ - [YAxUnit](https://github.com/bia-technologies/yaxunit) (Алексей Корякин) — на нём пробы в тонком клиенте,
219
+ дымовой тест форм и сценарные тесты;
220
+ - [1C: Platform Tools](https://github.com/yellow-hammer/vscode-1c-platform-tools) (Иван Карло) — хуки загрузки в
221
+ VS Code, через которые ОТК проверяет правку до и после загрузки;
222
+ - Нинель Щербакова — [статья о формате справки `*.hbk`](https://infostart.ru/1c/articles/2804420/), по ней ОТК
223
+ строит индекс методов и типов платформы;
224
+ - [OpenSpec](https://github.com/Fission-AI/OpenSpec) — формат требований проекта;
225
+ - [1c-agent-based-dev-framework](https://github.com/SteelMorgan/1c-agent-based-dev-framework) (Владимир Акимов) —
226
+ образец реестра сторонних инструментов.
227
+
228
+ Все инструменты, их лицензии и что именно ОТК у них берёт — [docs/third-party.md](https://cmapnep-tools.github.io/otk-1c/third-party/).
229
+
230
+ ## Лицензия
231
+
232
+ [Apache-2.0](https://github.com/cmapnep-tools/otk-1c/blob/master/LICENSE). Автор — Илья Маликов; разработано при участии Claude (Anthropic), см. [NOTICE](https://github.com/cmapnep-tools/otk-1c/blob/master/NOTICE). Сторонние
233
+ инструменты и заимствования — [docs/third-party.md](https://cmapnep-tools.github.io/otk-1c/third-party/).