blockwatch-cli 0.20.0__tar.gz → 0.21.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 (372) hide show
  1. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/rust.yml +8 -5
  2. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/CHANGELOG.md +33 -0
  3. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/Cargo.lock +1 -1
  4. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/Cargo.toml +1 -1
  5. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/PKG-INFO +1 -1
  6. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/README.md +1 -1
  7. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/blockwatch.toml +1 -1
  8. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/clippy.toml +3 -0
  9. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/ci.md +2 -2
  10. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/cli.md +3 -3
  11. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/symbols.md +43 -12
  12. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/same-as.md +1 -1
  13. blockwatch_cli-0.21.0/rust-toolchain.toml +8 -0
  14. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/setup.py +1 -1
  15. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/virtual_block.rs +66 -25
  16. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/cli/mod.rs +2 -2
  17. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/diff/unified.rs +53 -36
  18. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/comments.rs +13 -31
  19. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/css.rs +11 -4
  20. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/mod.rs +2 -1
  21. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/parsers.rs +58 -129
  22. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/rust.rs +35 -26
  23. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/yaml.rs +304 -21
  24. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/run_report.rs +37 -31
  25. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/skill.md +5 -5
  26. blockwatch_cli-0.21.0/src/symbols/mod.rs +2255 -0
  27. blockwatch_cli-0.21.0/src/symbols/path.rs +990 -0
  28. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/affects.rs +37 -37
  29. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/check_ai.rs +10 -9
  30. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/check_lua.rs +90 -49
  31. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/keep_sorted.rs +44 -45
  32. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/keep_unique.rs +22 -23
  33. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/line_count.rs +13 -14
  34. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/line_pattern.rs +16 -17
  35. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/mod.rs +1 -1
  36. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/run.rs +48 -62
  37. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/same_as.rs +91 -91
  38. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/targets.rs +27 -2
  39. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/symbol_references.rs +9 -0
  40. blockwatch_cli-0.21.0/tests/testdata/symbol_references/filter_source.rs +14 -0
  41. blockwatch_cli-0.21.0/tests/testdata/symbol_references/filter_target.yaml +18 -0
  42. blockwatch_cli-0.21.0/tests/testdata/symbol_references/multi_doc_yaml_source.rs +19 -0
  43. blockwatch_cli-0.21.0/tests/testdata/symbol_references/multi_doc_yaml_target.yaml +13 -0
  44. blockwatch_cli-0.20.0/src/symbols/mod.rs +0 -1363
  45. blockwatch_cli-0.20.0/src/symbols/path.rs +0 -530
  46. blockwatch_cli-0.20.0/tests/testdata/symbol_references/filter_source.rs +0 -4
  47. blockwatch_cli-0.20.0/tests/testdata/symbol_references/filter_target.yaml +0 -5
  48. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.agents/.claude-plugin/plugin.json +0 -0
  49. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.agents/skills/blockwatch/SKILL.md +0 -0
  50. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.claude-plugin/marketplace.json +0 -0
  51. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/FUNDING.yml +0 -0
  52. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/dependabot.yml +0 -0
  53. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/actions.lock +0 -0
  54. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/blockwatch.yml +0 -0
  55. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/codeql.yml +0 -0
  56. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/lockfile.yml +0 -0
  57. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/markdownlint.yml +0 -0
  58. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/pypi.yml +0 -0
  59. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/release.yml +0 -0
  60. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/sign-archives.yml +0 -0
  61. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/site.yml +0 -0
  62. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/trusted-checks.yml +0 -0
  63. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/zizmor.yml +0 -0
  64. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.gitignore +0 -0
  65. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.markdownlint-cli2.yaml +0 -0
  66. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.pre-commit-config.yaml +0 -0
  67. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.pre-commit-hooks.yaml +0 -0
  68. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/AGENTS.md +0 -0
  69. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/CLAUDE.md +0 -0
  70. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/LICENSE +0 -0
  71. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/SECURITY.md +0 -0
  72. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/codecov.yml +0 -0
  73. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/demo.gif +0 -0
  74. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/dist-workspace.toml +0 -0
  75. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/agents.md +0 -0
  76. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/README.md +0 -0
  77. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/affects.md +0 -0
  78. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/check-ai.md +0 -0
  79. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/check-lua.md +0 -0
  80. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/keep-sorted.md +0 -0
  81. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/keep-unique.md +0 -0
  82. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/line-count.md +0 -0
  83. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/line-pattern.md +0 -0
  84. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/pypi/pyproject.toml +0 -0
  85. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/pyproject.toml +0 -0
  86. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/release.toml +0 -0
  87. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/scripts/check_language_count.lua +0 -0
  88. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/scripts/check_latest_gpt_nano_model.lua +0 -0
  89. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/keyword.rs +0 -0
  90. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/line_count.rs +0 -0
  91. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/mod.rs +0 -0
  92. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/number.rs +0 -0
  93. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/same_as.rs +0 -0
  94. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/severity.rs +0 -0
  95. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/sort.rs +0 -0
  96. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/target_reference.rs +0 -0
  97. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/address.rs +0 -0
  98. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/from_comments.rs +0 -0
  99. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/mod.rs +0 -0
  100. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/tags.rs +0 -0
  101. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/cli/flags.rs +0 -0
  102. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/cli/path_arguments.rs +0 -0
  103. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/config.rs +0 -0
  104. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/diff/mod.rs +0 -0
  105. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/diff/target_path.rs +0 -0
  106. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/fs/glob.rs +0 -0
  107. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/fs/mod.rs +0 -0
  108. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/fs/path_filter.rs +0 -0
  109. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/bash.rs +0 -0
  110. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/c.rs +0 -0
  111. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/c_sharp.rs +0 -0
  112. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/cmake.rs +0 -0
  113. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/code_symbols.rs +0 -0
  114. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/cpp.rs +0 -0
  115. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/dart.rs +0 -0
  116. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/dockerfile.rs +0 -0
  117. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/elixir.rs +0 -0
  118. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/file_names.rs +0 -0
  119. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/go.rs +0 -0
  120. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/graphql.rs +0 -0
  121. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/groovy.rs +0 -0
  122. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/hcl.rs +0 -0
  123. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/html.rs +0 -0
  124. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/java.rs +0 -0
  125. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/javascript.rs +0 -0
  126. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/json.rs +0 -0
  127. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/kotlin.rs +0 -0
  128. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/lean.rs +0 -0
  129. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/lua.rs +0 -0
  130. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/makefile.rs +0 -0
  131. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/markdown.rs +0 -0
  132. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/mdx.rs +0 -0
  133. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/nix.rs +0 -0
  134. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/ocaml.rs +0 -0
  135. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/php.rs +0 -0
  136. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/proto.rs +0 -0
  137. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/python.rs +0 -0
  138. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/ruby.rs +0 -0
  139. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/scala.rs +0 -0
  140. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/sql.rs +0 -0
  141. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/starlark.rs +0 -0
  142. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/swift.rs +0 -0
  143. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/syntax_tree.rs +0 -0
  144. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/toml.rs +0 -0
  145. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/tsx.rs +0 -0
  146. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/typescript.rs +0 -0
  147. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/xml.rs +0 -0
  148. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/lib.rs +0 -0
  149. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/main.rs +0 -0
  150. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/explain.rs +0 -0
  151. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/listing.rs +0 -0
  152. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/mod.rs +0 -0
  153. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/sarif.rs +0 -0
  154. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/position.rs +0 -0
  155. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/repo_path.rs +0 -0
  156. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/scan.rs +0 -0
  157. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/settings.rs +0 -0
  158. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/context.rs +0 -0
  159. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/log.rs +0 -0
  160. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/pattern_values.rs +0 -0
  161. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/validator.rs +0 -0
  162. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/violation.rs +0 -0
  163. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/violation_address.rs +0 -0
  164. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/affects.rs +0 -0
  165. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/check_ai.rs +0 -0
  166. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/check_lua.rs +0 -0
  167. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/common/empty.toml +0 -0
  168. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/common/mod.rs +0 -0
  169. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/config.rs +0 -0
  170. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/encoding.rs +0 -0
  171. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/explain.rs +0 -0
  172. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/general.rs +0 -0
  173. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/keep_sorted.rs +0 -0
  174. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/keep_unique.rs +0 -0
  175. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/line_count.rs +0 -0
  176. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/line_pattern.rs +0 -0
  177. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/list.rs +0 -0
  178. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/path_arguments.rs +0 -0
  179. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/repository_root.rs +0 -0
  180. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/same_as.rs +0 -0
  181. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/sarif.rs +0 -0
  182. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/skill.rs +0 -0
  183. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/suppressions.rs +0 -0
  184. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/cross_file_source.rs +0 -0
  185. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/cross_file_target.md +0 -0
  186. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/custom_ext_source.javascript +0 -0
  187. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/custom_ext_target.javascript +0 -0
  188. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/dangling.md +0 -0
  189. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/missing_symbol.rs +0 -0
  190. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/more_added_than_deleted.py +0 -0
  191. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/multiline_tag_source.rs +0 -0
  192. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/multiline_tag_target.rs +0 -0
  193. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/nested_mapping_source.rs +0 -0
  194. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/nested_mapping_target.yaml +0 -0
  195. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/sibling.md +0 -0
  196. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/symbol_source.rs +0 -0
  197. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/symbol_target.json +0 -0
  198. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/table_source.rs +0 -0
  199. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/table_target.toml +0 -0
  200. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/tag_and_content_source.ts +0 -0
  201. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/tag_and_content_target.ts +0 -0
  202. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/whole_file_source.rs +0 -0
  203. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/whole_file_target.json +0 -0
  204. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_ai/two_blocks.py +0 -0
  205. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/affects.lua +0 -0
  206. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/affects.py +0 -0
  207. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/affects_drift.py +0 -0
  208. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/blocking_io.lua +0 -0
  209. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/blocking_io.py +0 -0
  210. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/echo.lua +0 -0
  211. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/fail.lua +0 -0
  212. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/mode.py +0 -0
  213. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/os.lua +0 -0
  214. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pathfmt/report_path.lua +0 -0
  215. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pathfmt/source.py +0 -0
  216. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pattern.py +0 -0
  217. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pattern_many_matches.py +0 -0
  218. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pattern_no_match.py +0 -0
  219. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/success.lua +0 -0
  220. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/success_and_failure.py +0 -0
  221. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/config.toml +0 -0
  222. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/package.json +0 -0
  223. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/plugins/blue/package.json +0 -0
  224. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/plugins/green/package.json +0 -0
  225. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/plugins/red/package.json +0 -0
  226. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_patterns/config.toml +0 -0
  227. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_patterns/services/a/.env +0 -0
  228. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_patterns/services/b/.env +0 -0
  229. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_symbol_change/a.yml +0 -0
  230. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_symbol_change/config.toml +0 -0
  231. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/explain/a.py +0 -0
  232. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/explain/check.lua +0 -0
  233. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/block_selection.py +0 -0
  234. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/custom_file_extension.javascript +0 -0
  235. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/custom_file_extension.python +0 -0
  236. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/disable_enable.py +0 -0
  237. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/paths/invalid.py +0 -0
  238. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/paths/subdir/nested_invalid.py +0 -0
  239. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/paths/valid.py +0 -0
  240. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/severity.py +0 -0
  241. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/hidden/.github/workflows/ci.yml +0 -0
  242. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/keep_sorted/orderings.py +0 -0
  243. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/keep_unique/basic_and_pattern.py +0 -0
  244. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/line_count/equality_and_greater_than.py +0 -0
  245. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/line_pattern/forbidden_text.py +0 -0
  246. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/line_pattern/hex_and_word_patterns.py +0 -0
  247. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/list/.hg/.gitkeep +0 -0
  248. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/list/a.py +0 -0
  249. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/list/b.py +0 -0
  250. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/positions/unicode_columns.py +0 -0
  251. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/custom_ext_source.javascript +0 -0
  252. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/custom_ext_target.javascript +0 -0
  253. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/package.json +0 -0
  254. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths/alpha/item.txt +0 -0
  255. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths/beta/item.txt +0 -0
  256. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths_and_block_source.md +0 -0
  257. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths_source.md +0 -0
  258. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/sibling.rs +0 -0
  259. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/source.rs +0 -0
  260. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/split_table_source.rs +0 -0
  261. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/split_table_target.toml +0 -0
  262. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/symbol_mismatch_source.rs +0 -0
  263. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/symbol_source.rs +0 -0
  264. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/target.md +0 -0
  265. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/whole_file_mismatch_source.rs +0 -0
  266. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/whole_file_source.rs +0 -0
  267. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/whole_file_target.json +0 -0
  268. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/advisory.py +0 -0
  269. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/clean.py +0 -0
  270. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/sorted.py +0 -0
  271. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/unnamed.py +0 -0
  272. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg.txt +0 -0
  273. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_gone_a.txt +0 -0
  274. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_gone_b.txt +0 -0
  275. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_lowercase_trailer.txt +0 -0
  276. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_malformed.txt +0 -0
  277. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_with_noise.txt +0 -0
  278. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/dangling.py +0 -0
  279. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/sorted.py +0 -0
  280. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/symbol.py +0 -0
  281. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/symbol_target.json +0 -0
  282. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/two_rules.py +0 -0
  283. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/unnamed.py +0 -0
  284. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/Dockerfile +0 -0
  285. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/Makefile +0 -0
  286. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/bzl_source.rs +0 -0
  287. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/bzl_target.bzl +0 -0
  288. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/c_source.rs +0 -0
  289. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/c_target.c +0 -0
  290. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cpp_source.rs +0 -0
  291. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cpp_target.cpp +0 -0
  292. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cs_source.rs +0 -0
  293. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cs_target.cs +0 -0
  294. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/csproj_source.rs +0 -0
  295. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/csproj_target.csproj +0 -0
  296. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/css_source.rs +0 -0
  297. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/css_target.css +0 -0
  298. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/dart_source.rs +0 -0
  299. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/dart_target.dart +0 -0
  300. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/dockerfile_source.rs +0 -0
  301. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/escapes_source.rs +0 -0
  302. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/escapes_target.json +0 -0
  303. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/go_source.rs +0 -0
  304. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/go_target.go +0 -0
  305. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/h_source.rs +0 -0
  306. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/h_target.h +0 -0
  307. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/hcl_source.rs +0 -0
  308. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/hcl_target.hcl +0 -0
  309. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/java_source.rs +0 -0
  310. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/java_target.java +0 -0
  311. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/js_source.rs +0 -0
  312. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/js_target.js +0 -0
  313. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/json_source.rs +0 -0
  314. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/json_target.json +0 -0
  315. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/jsonc_source.rs +0 -0
  316. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/jsonc_target.jsonc +0 -0
  317. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kt_source.rs +0 -0
  318. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kt_target.kt +0 -0
  319. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kts_source.rs +0 -0
  320. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kts_target.kts +0 -0
  321. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/makefile_source.rs +0 -0
  322. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/markdown_source.rs +0 -0
  323. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/markdown_target.markdown +0 -0
  324. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/md_source.rs +0 -0
  325. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/md_target.md +0 -0
  326. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mdx_source.rs +0 -0
  327. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mdx_target.mdx +0 -0
  328. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mixed_list_source.rs +0 -0
  329. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mixed_list_target.json +0 -0
  330. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/nomad_source.rs +0 -0
  331. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/nomad_target.nomad +0 -0
  332. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/php_source.rs +0 -0
  333. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/php_target.php +0 -0
  334. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/phtml_source.rs +0 -0
  335. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/phtml_target.phtml +0 -0
  336. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/proto_source.rs +0 -0
  337. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/proto_target.proto +0 -0
  338. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/py_source.rs +0 -0
  339. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/py_target.py +0 -0
  340. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/rs_source.rs +0 -0
  341. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/rs_target.rs +0 -0
  342. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/sh_source.rs +0 -0
  343. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/sh_target.sh +0 -0
  344. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/swift_source.rs +0 -0
  345. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/swift_target.swift +0 -0
  346. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tf_source.rs +0 -0
  347. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tf_target.tf +0 -0
  348. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tfvars_source.rs +0 -0
  349. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tfvars_target.tfvars +0 -0
  350. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tofu_source.rs +0 -0
  351. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tofu_target.tofu +0 -0
  352. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/toml_source.rs +0 -0
  353. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/toml_target.toml +0 -0
  354. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/ts_source.rs +0 -0
  355. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/ts_target.ts +0 -0
  356. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tsx_source.rs +0 -0
  357. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tsx_target.tsx +0 -0
  358. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/xml_source.rs +0 -0
  359. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/xml_target.xml +0 -0
  360. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yaml_source.rs +0 -0
  361. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yaml_target.yaml +0 -0
  362. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yml_source.rs +0 -0
  363. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yml_target.yml +0 -0
  364. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/affects/pair.py +0 -0
  365. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/counted.py +0 -0
  366. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/noop.py +0 -0
  367. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/notes.txt +0 -0
  368. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/sorted.py +0 -0
  369. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/diff/two_blocks.py +0 -0
  370. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/failing/unsorted.py +0 -0
  371. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/mixed/both_kinds.py +0 -0
  372. {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/verbosity.rs +0 -0
@@ -21,10 +21,8 @@ jobs:
21
21
  - uses: actions/checkout@v7.0.1
22
22
  with:
23
23
  persist-credentials: false
24
- - uses: dtolnay/rust-toolchain@v1
25
- with:
26
- toolchain: stable
27
- components: llvm-tools-preview, clippy, rustfmt
24
+ - name: Install the Rust that rust-toolchain.toml pins
25
+ run: rustup toolchain install --no-self-update
28
26
  - name: Cache cargo
29
27
  uses: Swatinem/rust-cache@v2.9.3
30
28
  - name: Install cargo-llvm-cov
@@ -58,6 +56,11 @@ jobs:
58
56
 
59
57
  runs-on: ubuntu-latest
60
58
 
59
+ # The action below makes this Rust the default one, but rust-toolchain.toml wins over the default. This variable
60
+ # wins over the file.
61
+ env:
62
+ RUSTUP_TOOLCHAIN: '1.98'
63
+
61
64
  steps:
62
65
  - uses: actions/checkout@v7.0.1
63
66
  with:
@@ -65,7 +68,7 @@ jobs:
65
68
  - name: Install the oldest supported Rust
66
69
  uses: dtolnay/rust-toolchain@v1
67
70
  with:
68
- toolchain: '1.98'
71
+ toolchain: ${{ env.RUSTUP_TOOLCHAIN }}
69
72
  - name: Cache cargo
70
73
  uses: Swatinem/rust-cache@v2.9.3
71
74
  - name: Build on the oldest supported Rust
@@ -12,6 +12,39 @@ Releases up to and including v0.3.11 predate this file. Their notes live on the
12
12
 
13
13
  ## [Unreleased] - ReleaseDate
14
14
 
15
+ ## [0.21.0] - 2026-11-25
16
+
17
+ ### Added
18
+
19
+ - Multi-document YAML files (2 or more non-empty documents separated by `---`) now have symbols, with each document
20
+ indexed from 0 (`/0`, `/1`, ...) and its contents nested under it. Files with one non-empty document keep their
21
+ existing paths, and empty or comment-only documents do not take an index. Together with nested compound filters,
22
+ paths such as `k8s/workload.yaml#/~[kind=Rollout][metadata/name=api]/spec/replicas` work directly on multi-document
23
+ manifests.
24
+ - Symbol path filters now accept nested keys separated by `/` and chained `[key=value]` conditions on one item, such as
25
+ `#/items/~[kind=Rollout][metadata/name=api]/spec/replicas` and `#/items/~[spec/containers/0/name=web]/kind`. Escape a
26
+ literal `/` in a key segment or filter value as `~1`, and a literal `]` before `[` as `%5D`. Repeated matching keys
27
+ inside one item count that item once instead of failing as ambiguous.
28
+
29
+ ### Changed
30
+
31
+ - A filter in a symbol path that matches no item now reports `no item matches ~[...]` (or `/parent not found` when the
32
+ path before the filter does not exist). Before, it reported `symbol not found` and suggested `did you mean:` paths.
33
+ - Symbol path filters now split conditions and keys before percent-decoding, which changes three forms that worked in
34
+ 0.20.0:
35
+ - `][` inside a filter value now starts another condition instead of matching literally; escape the `]` as `%5D`
36
+ (`~[k=a%5D[b]=c]`).
37
+ - `%3D` inside a filter key now decodes to a literal `=` in the key (`~[a%3Db=1]` matches key `a=b`, value `1`)
38
+ instead of separating key from value.
39
+ - A filter segment must start with a literal `~[`; percent-encoded forms such as `~%5B...` or `%7E%5B...` are now
40
+ read as keys, not filters.
41
+
42
+ ### Fixed
43
+
44
+ - YAML mapping and list symbol ranges no longer include trailing comment lines written after the block. Before, a
45
+ container at the end of a file or mapping could include a following `# ...` comment in its text for `same-as` and
46
+ virtual blocks.
47
+
15
48
  ## [0.20.0] - 2026-11-21
16
49
 
17
50
  ### Changed
@@ -274,7 +274,7 @@ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
274
274
 
275
275
  [[package]]
276
276
  name = "blockwatch"
277
- version = "0.20.0"
277
+ version = "0.21.0"
278
278
  dependencies = [
279
279
  "anyhow",
280
280
  "assert-json-diff",
@@ -1,6 +1,6 @@
1
1
  [package]
2
2
  name = "blockwatch"
3
- version = "0.20.0"
3
+ version = "0.21.0"
4
4
  edition = "2024"
5
5
  rust-version = "1.98"
6
6
  repository = "https://github.com/mennanov/blockwatch"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blockwatch-cli
3
- Version: 0.20.0
3
+ Version: 0.21.0
4
4
  Summary: Language agnostic linter that keeps your code and documentation in sync and valid
5
5
  Keywords: linter,sync,drift,comments,agents
6
6
  Home-Page: https://blockwatch.sh
@@ -241,7 +241,7 @@ exclusions, and custom extension mappings.
241
241
 
242
242
  ```yaml
243
243
  - repo: https://github.com/mennanov/blockwatch
244
- rev: v0.20.0 # Use latest release
244
+ rev: v0.21.0 # Use latest release
245
245
  hooks:
246
246
  - id: blockwatch
247
247
  ```
@@ -126,4 +126,4 @@ same-as-pattern = '^\|\s*`(?P<value>[a-z-]+)`'
126
126
  # CI builds blockwatch on the oldest Rust that Cargo.toml allows, so both must be the same version.
127
127
  [[block]]
128
128
  target = 'Cargo.toml#/package/rust-version'
129
- same-as = '.github/workflows/rust.yml#/jobs/oldest-rust/steps/~[name=Install the oldest supported Rust]/with/toolchain'
129
+ same-as = '.github/workflows/rust.yml#/jobs/oldest-rust/env/RUSTUP_TOOLCHAIN'
@@ -13,3 +13,6 @@ disallowed-methods = [
13
13
  allow-unwrap-in-tests = true
14
14
  # `doc_markdown` would want backticks around these. The `".."` keeps clippy's own list.
15
15
  doc-valid-idents = ["CMake", "CommonMark", "MakeMaker", "OpenAI", ".."]
16
+ # Deep nesting makes a reader track every enclosing loop, `match` and closure at once. A deeper block moves
17
+ # into its own function.
18
+ excessive-nesting-threshold = 5
@@ -19,7 +19,7 @@ To use [pre-commit](https://pre-commit.com), add the hook to `.pre-commit-config
19
19
 
20
20
  ```yaml
21
21
  - repo: https://github.com/mennanov/blockwatch
22
- rev: v0.20.0 # Use latest release
22
+ rev: v0.21.0 # Use latest release
23
23
  hooks:
24
24
  - id: blockwatch
25
25
  ```
@@ -59,7 +59,7 @@ The `blockwatch` hook runs before the commit message exists, so it cannot see a
59
59
 
60
60
  ```yaml
61
61
  - repo: https://github.com/mennanov/blockwatch
62
- rev: v0.20.0 # Use latest release
62
+ rev: v0.21.0 # Use latest release
63
63
  hooks:
64
64
  - id: blockwatch-commit-msg
65
65
  ```
@@ -683,15 +683,15 @@ Nothing else about the run changes: the same violations are found, and the exit
683
683
  "tool": {
684
684
  "driver": {
685
685
  "name": "blockwatch",
686
- "version": "0.20.0",
687
- "semanticVersion": "0.20.0",
686
+ "version": "0.21.0",
687
+ "semanticVersion": "0.21.0",
688
688
  "informationUri": "https://github.com/mennanov/blockwatch",
689
689
  "rules": [
690
690
  {
691
691
  "id": "keep-sorted",
692
692
  "name": "keep-sorted",
693
693
  "shortDescription": { "text": "Requires the lines of a block to stay in order." },
694
- "helpUri": "https://github.com/mennanov/blockwatch/blob/v0.20.0/docs/validators/keep-sorted.md"
694
+ "helpUri": "https://github.com/mennanov/blockwatch/blob/v0.21.0/docs/validators/keep-sorted.md"
695
695
  }
696
696
  ]
697
697
  }
@@ -102,23 +102,31 @@ services:
102
102
  | `#/services/1/port` | `9090` |
103
103
  | `#/services/~[name=worker]/port` | `9090` |
104
104
 
105
- - **Exactly one item must match.** No match is like a missing key. When the items have the key, the message suggests
106
- the values that only one item holds: `did you mean: /services/~[name=worker]/port`. Several matches are a violation
107
- too: `2 items match ~[name=web], at 2:5, 6:5`.
105
+ - **Exactly one item must match.** Zero or several matches are a violation: `no item matches ~[name=db]`, or
106
+ `2 items match ~[name=web], at 2:5, 6:5`. When the path before the filter does not exist, the violation shows that
107
+ path instead: `/servics not found`.
108
108
  - **The value compares as a symbol reads it:** a string without its quotes, any other value as written. So
109
109
  `~[port=8080]` matches `port: 8080` and `port: "8080"`.
110
- - **Only a key right under the item counts.** A `name` deeper inside the item does not make it match.
110
+ - **A filter key can be nested with `/`.** `~[metadata/name=api]` picks the item whose `metadata/name` holds `api`,
111
+ and `~[spec/containers/0/name=web]` matches through a list index. A filter without `/` still checks only a key right
112
+ under the item, so a `name` deeper inside does not match `~[name=api]`.
113
+ - **Chain `[key=value]` brackets to combine conditions on one item.** `~[kind=Rollout][metadata/name=api]` matches only
114
+ an item where `kind` is `Rollout` and `metadata/name` is `api`. For an ambiguous compound filter, the error reports
115
+ the position of the first condition's key for each matching item.
116
+ - **Repeated matching keys inside one item count that item once.**
111
117
  - **A filter picks a map entry too.** In `{"a": {"name": "x"}}`, `#/~[name=x]` is `#/a`.
112
118
  - **A path can hold several filters**, such as `#/groups/~[name=api]/services/~[name=web]/port`. A filter can come
113
- first, in a file that is a list: `#/~[name=web]`.
119
+ first, in a file that is a list or has several YAML documents: `#/~[name=web]`.
114
120
  - **When several items share a path, the rest of the path looks only inside the item the filter picked.** For
115
121
  example, two `ingress` blocks in an HCL resource share a path.
116
122
  `#/resource/aws_security_group/web/~[from_port=443]/to_port` is the `to_port` of the block whose `from_port` is
117
123
  `443`.
118
- - **A filter that reaches an unreadable path stops the run**, as that path does. An item blockwatch can't read, such
119
- as one with a syntax error, also stops a filter that compares its key, because that item could match too.
120
- - **The value starts after the first `=` and ends at the last `]`,** so it can hold both. The key can't hold `=`.
121
- Inside a filter, escape the key and the value like any key: `/` as `~1`, `,` as `%2C`, and so on.
124
+ - **A filter that reaches an unreadable path stops the run**, as that path does. An unreadable path at or above any
125
+ condition's key in a child, such as one with a syntax error, also stops the filter because that item could match too.
126
+ - **The value starts after the first `=` and ends at the closing `]`,** so `=` and a lone `]` work as written
127
+ (`~[k=a=b]c]`). Write `%5D` for a literal `]` before `[` (so `][` does not start another condition), and `%3D` for a
128
+ literal `=` inside a key. Escape each key segment and value like any key: `/` as `~1` (in both key segments and
129
+ values, such as `~[apiVersion=argoproj.io~1v1alpha1]`), `,` as `%2C`, and so on.
122
130
 
123
131
  Keys that look like filters still work. `[python]`, as in VS Code settings, needs no escape. A key that starts with
124
132
  `~[` is written `~0[`, as RFC 6901 already requires.
@@ -221,9 +229,32 @@ jobs:
221
229
  - **An alias (`*name`) is not a symbol.** What it stands for is written elsewhere, so a path to it or through it is not
222
230
  found. In a list, an alias still takes its position. `<<` is an ordinary key.
223
231
  - **A key that is a list or a mapping,** such as `? [a, b]`, is skipped with everything under it.
224
- - **A key written twice is a violation**, because blockwatch can't tell which copy you mean.
225
- - **A file with several documents stops the run.** A path can't say which document it means. Put the value in a named
226
- block instead.
232
+ - **A key written twice in one document is a violation**, because blockwatch can't tell which copy you mean.
233
+
234
+ A file with two or more non-empty documents indexes each document from 0 (`/0`, `/1`, ...) and nests its contents under
235
+ that index. Empty and comment-only documents between `---` markers do not count, and a file with one document keeps its
236
+ paths without an index:
237
+
238
+ ```yaml
239
+ apiVersion: v1
240
+ kind: Service
241
+ metadata:
242
+ name: api
243
+ ---
244
+ apiVersion: argoproj.io/v1alpha1
245
+ kind: Rollout
246
+ metadata:
247
+ name: api
248
+ spec:
249
+ replicas: 2
250
+ ```
251
+
252
+ | Path | Points at |
253
+ |------------------------------------------------------|--------------------------|
254
+ | `#/0/kind` | `Service` |
255
+ | `#/1/spec/replicas` | `2` |
256
+ | `#/0` | the whole first document |
257
+ | `#/~[kind=Rollout][metadata/name=api]/spec/replicas` | `2` |
227
258
 
228
259
  <!-- </block> -->
229
260
 
@@ -383,7 +383,7 @@ const TIMEOUT_SECS: f64 = 2.0;
383
383
  - **Errors that stop the run:** an unknown `same-as-mode` or `same-as-format`, either of them on a block without
384
384
  `same-as` or `same-as-paths`, `same-as-pattern` on a block without `same-as`, `same-as-paths` or `name`, a
385
385
  `same-as-format` entry for a group that the pattern doesn't have, an invalid regex or glob, a missing target file,
386
- and a symbol in a file with a syntax error, without symbols, or with several YAML documents.
386
+ and a symbol in a file with a syntax error or without symbols.
387
387
  - **Run it on the whole tree now and then.** `same-as` needs no diff, so a plain `blockwatch` run catches drift that
388
388
  `--only-changed` misses. See [CI integration](../ci.md).
389
389
  - **A rename alone goes unnoticed in a diff.** Renaming a target file without changing it (a plain `git mv`) gives
@@ -0,0 +1,8 @@
1
+ # The Rust that builds, lints and tests this repository, on every machine and in CI. A new Rust
2
+ # release often adds clippy lints or changes them, and clippy runs with `-D warnings`. So with an
3
+ # unpinned Rust, a change can fail because of code it didn't touch. Move to a new version on
4
+ # purpose, in a commit that also fixes what its lints find.
5
+ [toolchain]
6
+ channel = "1.100.0"
7
+ profile = "minimal"
8
+ components = ["clippy", "llvm-tools-preview", "rustfmt"]
@@ -6,7 +6,7 @@ setup(
6
6
  name='blockwatch-pre-commit-placeholder',
7
7
  version='0.0.0',
8
8
  # <block name="blockwatch-cli-version" same-as-pattern="blockwatch-cli==(?P<value>\d+\.\d+\.\d+)">
9
- install_requires=['blockwatch-cli==0.20.0'],
9
+ install_requires=['blockwatch-cli==0.21.0'],
10
10
  # </block>
11
11
  # Without it, setuptools takes the directories under src/ for Python packages.
12
12
  packages=[],
@@ -6,7 +6,7 @@ use crate::diff::LineChanges;
6
6
  use crate::position::LineIndex;
7
7
  use crate::repo_path::RepoPath;
8
8
  use crate::symbols::SymbolPath;
9
- use crate::symbols::{ResolveError, Symbols};
9
+ use crate::symbols::Symbols;
10
10
  use anyhow::{anyhow, bail};
11
11
  use regex::{Captures, Regex, RegexBuilder};
12
12
  use std::hash::{Hash, Hasher};
@@ -339,30 +339,12 @@ impl VirtualBlock {
339
339
  symbols: &Symbols,
340
340
  path: &SymbolPath,
341
341
  ) -> anyhow::Result<Option<Vec<Range<usize>>>> {
342
- let found = match symbols.resolve(path) {
343
- Ok(symbol) => vec![symbol],
344
- Err(ResolveError::AmbiguousSymbol { candidates }) => candidates,
345
- Err(ResolveError::AmbiguousFilter { keys, .. }) => {
346
- // The filter stops the search, so the rest of the path is looked up under each
347
- // item it matches. A key such as `/items/1/name` is right under its item.
348
- let mut ranges = Vec::new();
349
- for key in keys {
350
- let index = key.path.segments().len() - 2;
351
- let item_path = path
352
- .clone()
353
- .with_segment(index, key.path.segments()[index].clone());
354
- ranges.extend(
355
- self.target_if_symbol_ranges(symbols, &item_path)?
356
- .unwrap_or_default(),
357
- );
358
- }
359
- return Ok(Some(ranges).filter(|ranges| !ranges.is_empty()));
360
- }
361
- Err(ResolveError::NotFound { .. }) => return Ok(None),
362
- Err(ResolveError::Unreadable { reason }) => {
363
- return Err(self.unresolved(anyhow!("{reason}")));
364
- }
365
- };
342
+ let found = symbols
343
+ .resolve_all(path)
344
+ .map_err(|unreadable| self.unresolved(anyhow!("{unreadable}")))?;
345
+ if found.is_empty() {
346
+ return Ok(None);
347
+ }
366
348
  Ok(Some(
367
349
  found
368
350
  .iter()
@@ -392,6 +374,7 @@ mod tests {
392
374
  use crate::diff::{LineChange, LineChangeKind};
393
375
  use crate::languages::LanguageParsers;
394
376
  use crate::position::Position;
377
+ use crate::symbols::ResolveError;
395
378
  use std::collections::HashMap;
396
379
  use std::path::Path;
397
380
 
@@ -888,6 +871,64 @@ MODELS = [
888
871
  Ok(())
889
872
  }
890
873
 
874
+ #[test]
875
+ fn target_if_with_a_nested_filter_key_resolve_checks_each_matched_item() -> anyhow::Result<()> {
876
+ // A nested filter key in `target-if` looks for the rest of the path under each item whose
877
+ // nested key matches, and ignores items with another value.
878
+ let path = "#/items/~[metadata/name=a]/enabled";
879
+ let one_item_enabled = "\
880
+ items:
881
+ - metadata:
882
+ name: a
883
+ - metadata:
884
+ name: a
885
+ enabled: true
886
+ ";
887
+ let other_item_enabled = "\
888
+ items:
889
+ - metadata:
890
+ name: a
891
+ - metadata:
892
+ name: b
893
+ enabled: true
894
+ ";
895
+
896
+ assert!(gets_block("a.yml", one_item_enabled, &[path], &[])?);
897
+ assert!(!gets_block("a.yml", other_item_enabled, &[path], &[])?);
898
+ Ok(())
899
+ }
900
+
901
+ #[test]
902
+ fn target_if_with_a_compound_filter_resolve_checks_each_matched_item() -> anyhow::Result<()> {
903
+ // A compound filter in `target-if` looks for the rest of the path only under items that
904
+ // satisfy every condition.
905
+ let path = "#/items/~[kind=Service][metadata/name=api]/enabled";
906
+ let matched = "\
907
+ items:
908
+ - kind: Service
909
+ metadata:
910
+ name: api
911
+ - kind: Service
912
+ metadata:
913
+ name: api
914
+ enabled: true
915
+ ";
916
+ let only_other_kind_enabled = "\
917
+ items:
918
+ - kind: Service
919
+ metadata:
920
+ name: api
921
+ - kind: Rollout
922
+ metadata:
923
+ name: api
924
+ enabled: true
925
+ ";
926
+
927
+ assert!(gets_block("a.yml", matched, &[path], &[])?);
928
+ assert!(!gets_block("a.yml", only_other_kind_enabled, &[path], &[])?);
929
+ Ok(())
930
+ }
931
+
891
932
  #[test]
892
933
  fn target_if_with_unreadable_symbol_resolve_returns_error() -> anyhow::Result<()> {
893
934
  let symbols = Symbols::with_unreadable(
@@ -99,7 +99,7 @@ fn run_explain(args: &flags::Args, address: &BlockAddress) -> anyhow::Result<Exi
99
99
  )?;
100
100
  context.request_traces();
101
101
  let context = Arc::new(context);
102
- let log = validators::run(Arc::clone(&context), sync_validators, async_validators)?;
102
+ let log = validators::run(&context, sync_validators, async_validators)?;
103
103
 
104
104
  // Violations are what the run is for, so they are written first, as in `run_validators`. A
105
105
  // failure to write the explanation then can't discard them.
@@ -143,7 +143,7 @@ fn run_validators(args: &flags::Args) -> anyhow::Result<ExitCode> {
143
143
  &file_system,
144
144
  )?;
145
145
  let context = Arc::new(context);
146
- let mut log = validators::run(Arc::clone(&context), sync_validators, async_validators)?;
146
+ let mut log = validators::run(&context, sync_validators, async_validators)?;
147
147
  apply_suppressions(&suppressed_addresses, &mut log.violations);
148
148
 
149
149
  // Violations are what the run is for; the report only describes it. Writing them first keeps a
@@ -142,52 +142,69 @@ fn flush_group(
142
142
  deletion_anchor_line: usize,
143
143
  line_changes: &mut Vec<LineChange>,
144
144
  ) -> anyhow::Result<()> {
145
+ for line_change in group_changes(removed, added, deletion_anchor_line) {
146
+ push_line_change(line_changes, line_change)?;
147
+ }
148
+ removed.clear();
149
+ added.clear();
150
+ Ok(())
151
+ }
152
+
153
+ /// The [`LineChange`]s of the change group made of `removed` and `added`, in target-file order.
154
+ /// Gives one [`LineChangeKind::Deleted`] at `deletion_anchor_line` when the group only removed
155
+ /// lines, one change for each added line otherwise, and none for an empty group.
156
+ fn group_changes(
157
+ removed: &[&Line],
158
+ added: &[&Line],
159
+ deletion_anchor_line: usize,
160
+ ) -> Vec<LineChange> {
145
161
  if added.is_empty() {
146
162
  // A purely deleted group is represented by a single line change at the target-file line
147
163
  // now occupying the deleted region, since the deleted lines no longer exist there.
148
- if !removed.is_empty() {
149
- push_line_change(
150
- line_changes,
151
- LineChange {
152
- line: deletion_anchor_line,
153
- kind: LineChangeKind::Deleted,
154
- },
155
- )?;
164
+ if removed.is_empty() {
165
+ return Vec::new();
156
166
  }
157
- } else {
158
- let matched_removed_idxes = align_added_to_removed(removed, added);
159
- for (i, added_line) in added.iter().enumerate() {
160
- let kind = match &matched_removed_idxes {
167
+ return vec![LineChange {
168
+ line: deletion_anchor_line,
169
+ kind: LineChangeKind::Deleted,
170
+ }];
171
+ }
172
+ let matched_removed_idxes = align_added_to_removed(removed, added);
173
+ // Removed lines with no counterpart are dropped: their region is already covered by the
174
+ // added lines of the same group.
175
+ added
176
+ .iter()
177
+ .enumerate()
178
+ .map(|(i, added_line)| LineChange {
179
+ line: added_line
180
+ .target_line_no
181
+ .expect("an added line is in the target file"),
182
+ kind: match &matched_removed_idxes {
161
183
  // The group removed nothing, so the line is an insertion: it brings a line break
162
184
  // that was not there before, on top of the characters it holds.
163
185
  None => LineChangeKind::Added,
164
186
  // The group rewrote the lines it removed into these, so it added no line break.
165
- // A line the pairing found no counterpart for is still part of that rewrite, and
166
- // every character it holds differs - but nothing past them does.
167
- Some(idxes) => LineChangeKind::Modified(match idxes[i] {
168
- Some(j) => line_diff(&removed[j].value, &added_line.value),
169
- None => {
170
- let whole_line = 0..added_line.value.chars().count();
171
- vec![whole_line]
172
- }
173
- }),
174
- };
175
- push_line_change(
176
- line_changes,
177
- LineChange {
178
- line: added_line
179
- .target_line_no
180
- .expect("an added line is in the target file"),
181
- kind,
182
- },
183
- )?;
187
+ Some(idxes) => LineChangeKind::Modified(changed_ranges(
188
+ idxes[i].map(|j| removed[j]),
189
+ added_line,
190
+ )),
191
+ },
192
+ })
193
+ .collect()
194
+ }
195
+
196
+ /// The character ranges of `added_line` that differ from `counterpart`, the removed line it is
197
+ /// paired with, in order. The whole line when it has no counterpart.
198
+ fn changed_ranges(counterpart: Option<&Line>, added_line: &Line) -> Vec<Range<usize>> {
199
+ match counterpart {
200
+ Some(removed_line) => line_diff(&removed_line.value, &added_line.value),
201
+ // A line the pairing found no counterpart for is still part of the group's rewrite, and
202
+ // every character it holds differs - but nothing past them does.
203
+ None => {
204
+ let whole_line = 0..added_line.value.chars().count();
205
+ vec![whole_line]
184
206
  }
185
- // Removed lines with no counterpart are dropped: their region is already covered by the
186
- // added lines of the same group.
187
207
  }
188
- removed.clear();
189
- added.clear();
190
- Ok(())
191
208
  }
192
209
 
193
210
  /// Maximum `removed.len() * added.len()` of a change group for similarity-based pairing; larger
@@ -44,43 +44,25 @@ impl TreeSitterCommentsParser {
44
44
 
45
45
  /// Stops the walk at nodes of `kinds` without reading a comment out of them.
46
46
  pub(super) fn with_break_at_node_kinds(self, kinds: &'static [&'static str]) -> Self {
47
- let Self {
48
- parser,
49
- node_visitor,
50
- tree,
51
- } = self;
52
- Self {
53
- parser,
54
- node_visitor: Box::new(move |node, source_code| {
55
- if kinds.contains(&node.kind()) {
56
- return Visit::Break(None);
57
- }
58
- node_visitor(node, source_code)
59
- }),
60
- tree,
61
- }
47
+ self.with_break_when(move |node, _| kinds.contains(&node.kind()))
62
48
  }
63
49
 
64
50
  /// Stops the walk at every node the `predicate` accepts, without reading a comment out of it.
65
51
  ///
66
52
  /// Unlike [`Self::with_break_at_node_kinds`], the predicate also sees the source code, so it
67
53
  /// can judge a node by the surrounding text.
68
- pub(super) fn with_break_when(self, predicate: fn(&Node, &str) -> bool) -> Self {
69
- let Self {
70
- parser,
71
- node_visitor,
72
- tree,
73
- } = self;
74
- Self {
75
- parser,
76
- node_visitor: Box::new(move |node, source_code| {
77
- if predicate(node, source_code) {
78
- return Visit::Break(None);
79
- }
80
- node_visitor(node, source_code)
81
- }),
82
- tree,
83
- }
54
+ pub(super) fn with_break_when(
55
+ mut self,
56
+ predicate: impl Fn(&Node, &str) -> bool + Send + Sync + 'static,
57
+ ) -> Self {
58
+ let node_visitor = self.node_visitor;
59
+ self.node_visitor = Box::new(move |node, source_code| {
60
+ if predicate(node, source_code) {
61
+ return Visit::Break(None);
62
+ }
63
+ node_visitor(node, source_code)
64
+ });
65
+ self
84
66
  }
85
67
  }
86
68
 
@@ -304,10 +304,7 @@ impl<'i> DeclarationParser<'i> for Walk<'_> {
304
304
  | Token::SquareBracketBlock
305
305
  | Token::CurlyBracketBlock
306
306
  ) {
307
- input.parse_nested_block(|block| {
308
- while block.next().is_ok() {}
309
- Ok::<(), ParseError<()>>(())
310
- })?;
307
+ input.parse_nested_block(skip_block)?;
311
308
  }
312
309
  tokens.push((token_start..input.position(), token));
313
310
  }
@@ -347,6 +344,16 @@ impl<'i> DeclarationParser<'i> for Walk<'_> {
347
344
  }
348
345
  }
349
346
 
347
+ /// Reads every token of `block`, a block such as the arguments of a function. Never fails.
348
+ #[expect(
349
+ clippy::unnecessary_wraps,
350
+ reason = "`Parser::parse_nested_block` takes a function that returns a `Result`"
351
+ )]
352
+ fn skip_block(block: &mut Parser) -> Result<(), ParseError<()>> {
353
+ while block.next().is_ok() {}
354
+ Ok(())
355
+ }
356
+
350
357
  impl RuleBodyItemParser<'_, (), ()> for Walk<'_> {
351
358
  fn parse_declarations(&self) -> bool {
352
359
  true
@@ -58,6 +58,7 @@ use comments::{
58
58
  c_style_multiline_comment_processor, comment_visitor, ecmascript_comments_parser,
59
59
  python_style_comments_parser, xml_style_comments_parser,
60
60
  };
61
+ use strum_macros::EnumIter;
61
62
  use syntax_tree::{ensure_no_syntax_error, members, node_text, tree_sitter_parser, walk_tree};
62
63
 
63
64
  /// A language that blockwatch parses, one variant per parser.
@@ -65,7 +66,7 @@ use syntax_tree::{ensure_no_syntax_error, members, node_text, tree_sitter_parser
65
66
  /// Two names that need different parsers are two variants, even when people call them one
66
67
  /// language: `Bash` and `Zsh`, `TypeScript` and `Tsx`, `Go` and `GoModule`.
67
68
  // <block name="languages" affects="src/languages/parsers.rs:supported-extensions, README.md:supported-grammar">
68
- #[derive(Clone, Copy, Debug, PartialEq, Eq)]
69
+ #[derive(Clone, Copy, Debug, PartialEq, Eq, EnumIter)]
69
70
  pub(crate) enum Language {
70
71
  Bash,
71
72
  C,