blockwatch-cli 0.16.6__tar.gz → 0.16.7__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 (323) hide show
  1. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/CHANGELOG.md +17 -0
  2. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/Cargo.lock +1 -1
  3. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/Cargo.toml +1 -1
  4. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/PKG-INFO +1 -1
  5. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/README.md +4 -4
  6. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/blockwatch.toml +1 -1
  7. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/ci.md +2 -2
  8. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/cli.md +3 -3
  9. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/symbols.md +163 -7
  10. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/setup.py +1 -1
  11. blockwatch_cli-0.16.7/src/language_parsers/bash.rs +553 -0
  12. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/mod.rs +11 -3
  13. blockwatch_cli-0.16.7/src/language_parsers/php.rs +1382 -0
  14. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/python.rs +91 -13
  15. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/skill.md +44 -6
  16. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/symbol_references.rs +21 -0
  17. blockwatch_cli-0.16.7/tests/testdata/symbol_references/php_source.rs +3 -0
  18. blockwatch_cli-0.16.7/tests/testdata/symbol_references/php_target.php +7 -0
  19. blockwatch_cli-0.16.7/tests/testdata/symbol_references/phtml_source.rs +3 -0
  20. blockwatch_cli-0.16.7/tests/testdata/symbol_references/phtml_target.phtml +4 -0
  21. blockwatch_cli-0.16.7/tests/testdata/symbol_references/sh_source.rs +3 -0
  22. blockwatch_cli-0.16.7/tests/testdata/symbol_references/sh_target.sh +2 -0
  23. blockwatch_cli-0.16.6/src/language_parsers/bash.rs +0 -94
  24. blockwatch_cli-0.16.6/src/language_parsers/php.rs +0 -284
  25. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.agents/.claude-plugin/plugin.json +0 -0
  26. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.agents/skills/blockwatch/SKILL.md +0 -0
  27. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.claude-plugin/marketplace.json +0 -0
  28. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/dependabot.yml +0 -0
  29. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/workflows/blockwatch.yml +0 -0
  30. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/workflows/codeql.yml +0 -0
  31. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/workflows/markdownlint.yml +0 -0
  32. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/workflows/pypi.yml +0 -0
  33. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/workflows/release.yml +0 -0
  34. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/workflows/rust.yml +0 -0
  35. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.github/workflows/trusted-checks.yml +0 -0
  36. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.gitignore +0 -0
  37. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.markdownlint-cli2.yaml +0 -0
  38. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.pre-commit-config.yaml +0 -0
  39. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/.pre-commit-hooks.yaml +0 -0
  40. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/AGENTS.md +0 -0
  41. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/CLAUDE.md +0 -0
  42. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/LICENSE +0 -0
  43. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/SECURITY.md +0 -0
  44. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/clippy.toml +0 -0
  45. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/codecov.yml +0 -0
  46. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/demo.gif +0 -0
  47. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/dist-workspace.toml +0 -0
  48. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/agents.md +0 -0
  49. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/README.md +0 -0
  50. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/affects.md +0 -0
  51. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/check-ai.md +0 -0
  52. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/check-lua.md +0 -0
  53. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/keep-sorted.md +0 -0
  54. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/keep-unique.md +0 -0
  55. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/line-count.md +0 -0
  56. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/line-pattern.md +0 -0
  57. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/docs/validators/same-as.md +0 -0
  58. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/pypi/pyproject.toml +0 -0
  59. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/pyproject.toml +0 -0
  60. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/release.toml +0 -0
  61. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/scripts/check_language_count.lua +0 -0
  62. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/scripts/check_latest_gpt_nano_model.lua +0 -0
  63. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/block_parser.rs +0 -0
  64. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/blocks.rs +0 -0
  65. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/cli.rs +0 -0
  66. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/config.rs +0 -0
  67. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/diff_parser.rs +0 -0
  68. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/explain.rs +0 -0
  69. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/flags.rs +0 -0
  70. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/fs.rs +0 -0
  71. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/c.rs +0 -0
  72. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/c_sharp.rs +0 -0
  73. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/cmake.rs +0 -0
  74. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/cpp.rs +0 -0
  75. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/css.rs +0 -0
  76. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/dart.rs +0 -0
  77. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/dockerfile.rs +0 -0
  78. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/elixir.rs +0 -0
  79. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/go.rs +0 -0
  80. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/graphql.rs +0 -0
  81. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/groovy.rs +0 -0
  82. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/hcl.rs +0 -0
  83. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/html.rs +0 -0
  84. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/java.rs +0 -0
  85. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/javascript.rs +0 -0
  86. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/json.rs +0 -0
  87. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/kotlin.rs +0 -0
  88. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/lean.rs +0 -0
  89. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/lua.rs +0 -0
  90. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/makefile.rs +0 -0
  91. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/markdown.rs +0 -0
  92. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/mdx.rs +0 -0
  93. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/nix.rs +0 -0
  94. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/ocaml.rs +0 -0
  95. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/proto.rs +0 -0
  96. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/ruby.rs +0 -0
  97. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/rust.rs +0 -0
  98. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/scala.rs +0 -0
  99. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/sql.rs +0 -0
  100. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/starlark.rs +0 -0
  101. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/swift.rs +0 -0
  102. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/toml.rs +0 -0
  103. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/tsx.rs +0 -0
  104. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/typescript.rs +0 -0
  105. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/xml.rs +0 -0
  106. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/language_parsers/yaml.rs +0 -0
  107. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/lib.rs +0 -0
  108. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/main.rs +0 -0
  109. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/path_arguments.rs +0 -0
  110. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/paths_glob.rs +0 -0
  111. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/repo_path.rs +0 -0
  112. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/report.rs +0 -0
  113. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/sarif.rs +0 -0
  114. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/scan.rs +0 -0
  115. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/settings.rs +0 -0
  116. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/symbol_path.rs +0 -0
  117. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/symbols/code.rs +0 -0
  118. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/symbols/mod.rs +0 -0
  119. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/tag_parser.rs +0 -0
  120. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/target_reference.rs +0 -0
  121. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/affects.rs +0 -0
  122. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/check_ai.rs +0 -0
  123. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/check_lua.rs +0 -0
  124. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/keep_sorted.rs +0 -0
  125. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/keep_unique.rs +0 -0
  126. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/line_count.rs +0 -0
  127. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/line_pattern.rs +0 -0
  128. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/mod.rs +0 -0
  129. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/validators/same_as.rs +0 -0
  130. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/violation_address.rs +0 -0
  131. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/src/virtual_blocks.rs +0 -0
  132. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/affects.rs +0 -0
  133. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/check_ai.rs +0 -0
  134. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/check_lua.rs +0 -0
  135. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/common/empty.toml +0 -0
  136. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/common/mod.rs +0 -0
  137. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/config.rs +0 -0
  138. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/encoding.rs +0 -0
  139. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/explain.rs +0 -0
  140. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/general.rs +0 -0
  141. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/keep_sorted.rs +0 -0
  142. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/keep_unique.rs +0 -0
  143. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/line_count.rs +0 -0
  144. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/line_pattern.rs +0 -0
  145. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/list.rs +0 -0
  146. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/path_arguments.rs +0 -0
  147. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/repository_root.rs +0 -0
  148. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/same_as.rs +0 -0
  149. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/sarif.rs +0 -0
  150. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/skill.rs +0 -0
  151. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/suppressions.rs +0 -0
  152. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/cross_file_source.rs +0 -0
  153. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/cross_file_target.md +0 -0
  154. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/custom_ext_source.javascript +0 -0
  155. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/custom_ext_target.javascript +0 -0
  156. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/dangling.md +0 -0
  157. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/missing_symbol.rs +0 -0
  158. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/more_added_than_deleted.py +0 -0
  159. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/multiline_tag_source.rs +0 -0
  160. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/multiline_tag_target.rs +0 -0
  161. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/nested_mapping_source.rs +0 -0
  162. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/nested_mapping_target.yaml +0 -0
  163. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/sibling.md +0 -0
  164. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/symbol_source.rs +0 -0
  165. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/symbol_target.json +0 -0
  166. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/table_source.rs +0 -0
  167. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/table_target.toml +0 -0
  168. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/tag_and_content_source.ts +0 -0
  169. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/tag_and_content_target.ts +0 -0
  170. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/whole_file_source.rs +0 -0
  171. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/affects/whole_file_target.json +0 -0
  172. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_ai/two_blocks.py +0 -0
  173. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/affects.lua +0 -0
  174. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/affects.py +0 -0
  175. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/affects_drift.py +0 -0
  176. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/blocking_io.lua +0 -0
  177. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/blocking_io.py +0 -0
  178. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/echo.lua +0 -0
  179. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/fail.lua +0 -0
  180. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/mode.py +0 -0
  181. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/os.lua +0 -0
  182. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/pathfmt/report_path.lua +0 -0
  183. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/pathfmt/source.py +0 -0
  184. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/pattern.py +0 -0
  185. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/pattern_many_matches.py +0 -0
  186. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/pattern_no_match.py +0 -0
  187. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/success.lua +0 -0
  188. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/check_lua/success_and_failure.py +0 -0
  189. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/config/glob_target/config.toml +0 -0
  190. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/config/glob_target/package.json +0 -0
  191. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/config/glob_target/plugins/blue/package.json +0 -0
  192. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/config/glob_target/plugins/green/package.json +0 -0
  193. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/config/glob_target/plugins/red/package.json +0 -0
  194. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/explain/a.py +0 -0
  195. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/explain/check.lua +0 -0
  196. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/block_selection.py +0 -0
  197. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/custom_file_extension.javascript +0 -0
  198. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/custom_file_extension.python +0 -0
  199. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/disable_enable.py +0 -0
  200. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/paths/invalid.py +0 -0
  201. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/paths/subdir/nested_invalid.py +0 -0
  202. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/paths/valid.py +0 -0
  203. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/general/severity.py +0 -0
  204. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/hidden/.github/workflows/ci.yml +0 -0
  205. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/keep_sorted/orderings.py +0 -0
  206. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/keep_unique/basic_and_pattern.py +0 -0
  207. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/line_count/equality_and_greater_than.py +0 -0
  208. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/line_pattern/forbidden_text.py +0 -0
  209. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/line_pattern/hex_and_word_patterns.py +0 -0
  210. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/list/.hg/.gitkeep +0 -0
  211. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/list/a.py +0 -0
  212. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/list/b.py +0 -0
  213. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/positions/unicode_columns.py +0 -0
  214. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/custom_ext_source.javascript +0 -0
  215. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/custom_ext_target.javascript +0 -0
  216. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/package.json +0 -0
  217. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/paths/alpha/item.txt +0 -0
  218. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/paths/beta/item.txt +0 -0
  219. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/paths_and_block_source.md +0 -0
  220. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/paths_source.md +0 -0
  221. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/sibling.rs +0 -0
  222. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/source.rs +0 -0
  223. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/split_table_source.rs +0 -0
  224. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/split_table_target.toml +0 -0
  225. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/symbol_mismatch_source.rs +0 -0
  226. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/symbol_source.rs +0 -0
  227. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/target.md +0 -0
  228. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/whole_file_mismatch_source.rs +0 -0
  229. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/whole_file_source.rs +0 -0
  230. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/same_as/whole_file_target.json +0 -0
  231. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/sarif/advisory.py +0 -0
  232. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/sarif/clean.py +0 -0
  233. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/sarif/sorted.py +0 -0
  234. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/sarif/unnamed.py +0 -0
  235. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/commit_msg.txt +0 -0
  236. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/commit_msg_gone_a.txt +0 -0
  237. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/commit_msg_gone_b.txt +0 -0
  238. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/commit_msg_lowercase_trailer.txt +0 -0
  239. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/commit_msg_malformed.txt +0 -0
  240. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/commit_msg_with_noise.txt +0 -0
  241. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/dangling.py +0 -0
  242. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/sorted.py +0 -0
  243. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/symbol.py +0 -0
  244. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/symbol_target.json +0 -0
  245. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/two_rules.py +0 -0
  246. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/suppressions/unnamed.py +0 -0
  247. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/bzl_source.rs +0 -0
  248. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/bzl_target.bzl +0 -0
  249. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/c_source.rs +0 -0
  250. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/c_target.c +0 -0
  251. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/cpp_source.rs +0 -0
  252. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/cpp_target.cpp +0 -0
  253. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/cs_source.rs +0 -0
  254. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/cs_target.cs +0 -0
  255. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/csproj_source.rs +0 -0
  256. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/csproj_target.csproj +0 -0
  257. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/escapes_source.rs +0 -0
  258. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/escapes_target.json +0 -0
  259. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/filter_source.rs +0 -0
  260. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/filter_target.yaml +0 -0
  261. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/go_source.rs +0 -0
  262. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/go_target.go +0 -0
  263. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/h_source.rs +0 -0
  264. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/h_target.h +0 -0
  265. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/hcl_source.rs +0 -0
  266. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/hcl_target.hcl +0 -0
  267. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/java_source.rs +0 -0
  268. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/java_target.java +0 -0
  269. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/js_source.rs +0 -0
  270. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/js_target.js +0 -0
  271. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/json_source.rs +0 -0
  272. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/json_target.json +0 -0
  273. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/jsonc_source.rs +0 -0
  274. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/jsonc_target.jsonc +0 -0
  275. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/kt_source.rs +0 -0
  276. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/kt_target.kt +0 -0
  277. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/kts_source.rs +0 -0
  278. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/kts_target.kts +0 -0
  279. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/markdown_source.rs +0 -0
  280. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/markdown_target.markdown +0 -0
  281. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/md_source.rs +0 -0
  282. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/md_target.md +0 -0
  283. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/mdx_source.rs +0 -0
  284. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/mdx_target.mdx +0 -0
  285. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/mixed_list_source.rs +0 -0
  286. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/mixed_list_target.json +0 -0
  287. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/nomad_source.rs +0 -0
  288. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/nomad_target.nomad +0 -0
  289. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/proto_source.rs +0 -0
  290. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/proto_target.proto +0 -0
  291. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/py_source.rs +0 -0
  292. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/py_target.py +0 -0
  293. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/rs_source.rs +0 -0
  294. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/rs_target.rs +0 -0
  295. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/swift_source.rs +0 -0
  296. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/swift_target.swift +0 -0
  297. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tf_source.rs +0 -0
  298. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tf_target.tf +0 -0
  299. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tfvars_source.rs +0 -0
  300. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tfvars_target.tfvars +0 -0
  301. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tofu_source.rs +0 -0
  302. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tofu_target.tofu +0 -0
  303. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/toml_source.rs +0 -0
  304. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/toml_target.toml +0 -0
  305. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/ts_source.rs +0 -0
  306. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/ts_target.ts +0 -0
  307. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tsx_source.rs +0 -0
  308. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/tsx_target.tsx +0 -0
  309. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/xml_source.rs +0 -0
  310. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/xml_target.xml +0 -0
  311. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/yaml_source.rs +0 -0
  312. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/yaml_target.yaml +0 -0
  313. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/yml_source.rs +0 -0
  314. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/symbol_references/yml_target.yml +0 -0
  315. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/affects/pair.py +0 -0
  316. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/clean/counted.py +0 -0
  317. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/clean/noop.py +0 -0
  318. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/clean/notes.txt +0 -0
  319. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/clean/sorted.py +0 -0
  320. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/diff/two_blocks.py +0 -0
  321. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/failing/unsorted.py +0 -0
  322. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/testdata/verbosity/mixed/both_kinds.py +0 -0
  323. {blockwatch_cli-0.16.6 → blockwatch_cli-0.16.7}/tests/verbosity.rs +0 -0
@@ -12,6 +12,23 @@ 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.16.7] - 2026-11-04
16
+
17
+ ### Added
18
+
19
+ - Symbols in PHP files (`.php` and `.phtml`). `Invoice.php#/Invoice/STATUS_PAID` points at a class constant,
20
+ `#/Invoice/$perPage` at a property, and `version.php#/$wp_version` at a top-level variable. A
21
+ `define('NAME', value)` call is a symbol too, at `#/NAME`. The namespace is not part of a path. See
22
+ [PHP](docs/symbols.md#php).
23
+ - Symbols in shell scripts (`.sh`, `.bash`, `.bashrc`, `.bash_profile` and `.envrc`). `install.sh#/GO_VERSION`
24
+ points at the value of a variable, and `#/log` at a function. A name counts when it is set outside functions, loops
25
+ and subshells. zsh files have no symbols. See [Shell](docs/symbols.md#shell).
26
+
27
+ ### Fixed
28
+
29
+ - A Python or Starlark string with an escape that Python rejects, such as `"\x4"` or `"\N"`, gave its text as the
30
+ value. Now a path to it stops the run, as a path to a string with a `\N{...}` escape does.
31
+
15
32
  ## [0.16.6] - 2026-11-04
16
33
 
17
34
  ### Added
@@ -274,7 +274,7 @@ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
274
274
 
275
275
  [[package]]
276
276
  name = "blockwatch"
277
- version = "0.16.6"
277
+ version = "0.16.7"
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.16.6"
3
+ version = "0.16.7"
4
4
  edition = "2024"
5
5
  repository = "https://github.com/mennanov/blockwatch"
6
6
  description = "Language agnostic linter that keeps your code and documentation in sync and valid"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: blockwatch-cli
3
- Version: 0.16.6
3
+ Version: 0.16.7
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://github.com/mennanov/blockwatch
@@ -90,9 +90,9 @@ Two validators work across files:
90
90
 
91
91
  Both can point to a block, a whole file, a specific value in a file like `package.json#/version`, a section of a
92
92
  Markdown file, an element or attribute in an XML file such as `pom.xml` or a `.csproj`, a constant in a Go, C, C++,
93
- Python, Rust, TypeScript, JavaScript, Java, C#, Kotlin or Swift file, a field in a Protocol Buffers file, or a value in
94
- a Terraform or other HCL file (see [Symbols](docs/symbols.md)). The other validators check a single block on their
95
- own: the things you'd otherwise have to nitpick in code review.
93
+ Python, Rust, TypeScript, JavaScript, Java, C#, Kotlin, Swift or PHP file, a variable in a shell script, a field in a
94
+ Protocol Buffers file, or a value in a Terraform or other HCL file (see [Symbols](docs/symbols.md)). The other
95
+ validators check a single block on their own: the things you'd otherwise have to nitpick in code review.
96
96
 
97
97
  <!-- <block name="available-validators"
98
98
  same-as="src/validators/mod.rs:validator-registry, docs/validators/README.md:validators-index"
@@ -220,7 +220,7 @@ exclusions, and custom extension mappings.
220
220
 
221
221
  ```yaml
222
222
  - repo: https://github.com/mennanov/blockwatch
223
- rev: v0.16.6 # Use latest release
223
+ rev: v0.16.7 # Use latest release
224
224
  hooks:
225
225
  - id: blockwatch
226
226
  ```
@@ -50,4 +50,4 @@ same-as-pattern = '^\|\s*`(?P<value>[a-z-]+)`'
50
50
  [[block]]
51
51
  target = 'src/skill.md#/blockwatch/Symbols/Files with symbols'
52
52
  name = 'extensions-with-symbols'
53
- same-as-pattern = '`\.?(?P<value>[A-Za-z.]+)`'
53
+ same-as-pattern = '`\.?(?P<value>[A-Za-z._]+)`'
@@ -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.16.6 # Use latest release
22
+ rev: v0.16.7 # 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.16.6 # Use latest release
62
+ rev: v0.16.7 # Use latest release
63
63
  hooks:
64
64
  - id: blockwatch-commit-msg
65
65
  ```
@@ -557,15 +557,15 @@ Nothing else about the run changes: the same violations are found, and the exit
557
557
  "tool": {
558
558
  "driver": {
559
559
  "name": "blockwatch",
560
- "version": "0.16.6",
561
- "semanticVersion": "0.16.6",
560
+ "version": "0.16.7",
561
+ "semanticVersion": "0.16.7",
562
562
  "informationUri": "https://github.com/mennanov/blockwatch",
563
563
  "rules": [
564
564
  {
565
565
  "id": "keep-sorted",
566
566
  "name": "keep-sorted",
567
567
  "shortDescription": { "text": "Requires the lines of a block to stay in order." },
568
- "helpUri": "https://github.com/mennanov/blockwatch/blob/v0.16.6/docs/validators/keep-sorted.md"
568
+ "helpUri": "https://github.com/mennanov/blockwatch/blob/v0.16.7/docs/validators/keep-sorted.md"
569
569
  }
570
570
  ]
571
571
  }
@@ -22,7 +22,7 @@ declares, instead of tags in a comment.
22
22
  ## Files with symbols
23
23
 
24
24
  <!-- <block name="extensions-with-symbols" same-as="src/language_parsers/mod.rs:extensions-with-symbols"
25
- same-as-pattern="`\.?(?P<value>[A-Za-z.]+)`"> -->
25
+ same-as-pattern="`\.?(?P<value>[A-Za-z._]+)`"> -->
26
26
 
27
27
  | Language | Files | Paths |
28
28
  |------------------|-------------------------------------------------------------------------------------------------------------|---------------------------------------------------------|
@@ -44,6 +44,8 @@ declares, instead of tags in a comment.
44
44
  | Swift | `.swift` | [Swift](#swift) |
45
45
  | Protocol Buffers | `.proto` | [Protocol Buffers](#protocol-buffers) |
46
46
  | HCL (Terraform) | `.tf`, `.tofu`, `.tfvars`, `.hcl`, `.nomad` | [HCL](#hcl) |
47
+ | PHP | `.php`, `.phtml` | [PHP](#php) |
48
+ | Shell | `.sh`, `.bash`, `.bashrc`, `.bash_profile`, `.envrc` | [Shell](#shell) |
47
49
 
48
50
  <!-- </block> -->
49
51
 
@@ -323,9 +325,9 @@ is `@` and its name, under its element:
323
325
 
324
326
  In a code file, each top-level name is a symbol: a constant, a variable, a type, a function or a macro. Its path is
325
327
  `#/NAME`.
326
- With `const MaxPorts = 8` in `consts.go`, `consts.go#/MaxPorts` points at `8`. In Java, C#, Kotlin, Swift and Protocol
327
- Buffers, the members of a type are symbols too, under the type's name: `Config.java#/Config/MAX_PORTS`. In HCL, each
328
- block, attribute and object key is a symbol: `main.tf#/variable/region/default`.
328
+ With `const MaxPorts = 8` in `consts.go`, `consts.go#/MaxPorts` points at `8`. In Java, C#, Kotlin, Swift, Protocol
329
+ Buffers and PHP, the members of a type are symbols too, under the type's name: `Config.java#/Config/MAX_PORTS`. In
330
+ HCL, each block, attribute and object key is a symbol: `main.tf#/variable/region/default`.
329
331
 
330
332
  - **A value is the initializer as written.** blockwatch never works it out: `20 * 1024 * 1024` stays as it is, and so
331
333
  does `0x10`. Use `same-as-pattern` to take the part you need.
@@ -339,8 +341,8 @@ block, attribute and object key is a symbol: `main.tf#/variable/region/default`.
339
341
  with a name from the text that the parser had to skip. Other names in the file still resolve. The message shows
340
342
  where the error is.
341
343
  - **A path to a string that blockwatch can't decode stops the run.** Other paths in the file still resolve.
342
- - **Members are not symbols yet**, such as a method or a field, except in Java, C#, Kotlin, Swift, Protocol Buffers
343
- and HCL.
344
+ - **Members are not symbols yet**, such as a method or a field, except in Java, C#, Kotlin, Swift, Protocol Buffers,
345
+ HCL and PHP.
344
346
 
345
347
  <!-- </block> -->
346
348
 
@@ -466,7 +468,8 @@ def load(path):
466
468
  value: `type Pair[T] = tuple[T, T]` is `#/Pair`.
467
469
  - **Strings follow Python's escapes.** `"\xe9"` is `é`. An escape Python doesn't know, such as `\d`, stays as written.
468
470
  A raw string is its text. An f-string without a field is its text, with `{{` as `{`. An f-string with a field and
469
- bytes stay as written. A path to a string with a `\N{...}` escape stops the run.
471
+ bytes stay as written. A path to a string with a `\N{...}` escape stops the run, and so does a path to a string
472
+ with an escape that Python rejects, such as `"\x4"` or `"\N"`.
470
473
  - **Starlark files, such as `BUILD` and `.bzl`, follow the same rules.** A rule call, such as
471
474
  `cc_library(name = "lib")`, is not a symbol.
472
475
  - **Class members are not symbols yet.**
@@ -927,6 +930,159 @@ resource "aws_instance" "web" {
927
930
 
928
931
  <!-- </block> -->
929
932
 
933
+ ## PHP
934
+
935
+ <!-- <block name="php-paths"> -->
936
+
937
+ ```php
938
+ <?php
939
+ namespace App\Billing;
940
+
941
+ const MAX_RETRIES = 3;
942
+ define('API_URL', 'https://api.example.com');
943
+ $version = '2.4.1';
944
+
945
+ if (!function_exists('money')) {
946
+ function money(int $cents): string { return number_format($cents / 100, 2); }
947
+ }
948
+
949
+ #[Entity]
950
+ final class Invoice extends Model
951
+ {
952
+ public const STATUS_PAID = 'paid';
953
+ protected static int $perPage = 25;
954
+ protected $table;
955
+
956
+ public function __construct(private readonly string $currency = "EUR") {}
957
+
958
+ public function table(): string { return $this->table; }
959
+ }
960
+
961
+ enum Status: string
962
+ {
963
+ case Open = 'open';
964
+ case Paid = 'paid';
965
+ }
966
+ ```
967
+
968
+ | Path | Points at |
969
+ |-------------------------|-------------------------------------------------|
970
+ | `#/MAX_RETRIES` | `3` |
971
+ | `#/API_URL` | `https://api.example.com` |
972
+ | `#/$version` | `2.4.1` |
973
+ | `#/money` | the whole function |
974
+ | `#/Invoice` | the whole class, with `#[Entity]` |
975
+ | `#/Invoice/STATUS_PAID` | `paid` |
976
+ | `#/Invoice/$perPage` | `25` |
977
+ | `#/Invoice/$table` | `protected $table;`, as it has no default |
978
+ | `#/Invoice/$currency` | `EUR` |
979
+ | `#/Invoice/table` | the whole method |
980
+ | `#/Status/Paid` | `paid` |
981
+ | `#/App` | nothing, as a namespace is not a symbol |
982
+
983
+ - **Each top-level constant, variable, function, class, interface, trait and enum is a symbol, and so is each member
984
+ of a type**: a constant, a property, a method or an enum case. Both `const NAME = value;` and
985
+ `define('NAME', value);` define a constant.
986
+ - **The namespace is not part of a path.** Two namespaces in one file that define one name make that path a
987
+ violation.
988
+ - **A property and a variable keep their `$`**: `#/Invoice/$perPage`. So `$table` and `table()` have different paths.
989
+ - **A top-level variable is a symbol**: `$version = '2.4.1';` is `#/$version`. Only `$name = value` counts, not
990
+ `$items['key'] = 1` or `$object->name = 1`. In `$a = $b = 1`, only `$a` is a symbol, and its value is `$b = 1`.
991
+ - **A constructor parameter with a visibility is a property**: `private readonly string $currency` gives
992
+ `#/Invoice/$currency`. Its value is its default.
993
+ - **A definition in an `if`, `else`, `try`, `catch`, `finally`, `switch`, `declare` or `{ }` block counts**, such as a
994
+ function in `if (!function_exists('money'))`. One in a loop doesn't. A name defined in both branches of an `if` is a
995
+ violation.
996
+ - **Inside a function or a method, only a `define` is a symbol, and its path has no parent.** `define('BOOTED', 1);`
997
+ in the method `Kernel::boot()` gives `#/BOOTED`. Local variables, and functions and classes declared in a function,
998
+ are not symbols. Neither are closures, arrow functions and anonymous classes, or a `define` in them.
999
+ - **A `define` counts only as a whole statement whose name is plain text.** It covers the statement, with its `;`.
1000
+ `define($name, 1)`, `define('A\\', 1)`, `defined('X') or define('X', 1)` and a call with named arguments are not
1001
+ symbols.
1002
+ - **Names compare as written.** PHP ignores the case of class, function and method names, but `#/MONEY` doesn't find
1003
+ `function money`.
1004
+ - **Attributes are part of a definition. Doc comments are not.** In `const A = 1, B = 2;` and `public $a = 1, $b;`,
1005
+ each name covers only its own part.
1006
+ - **`namespace`, `use` imports, trait uses and `declare(strict_types=1)` are not symbols.** A trait's members sit under
1007
+ the trait, not under the classes that use it. The keys of an array, such as `return ['timezone' => 'UTC']` in a
1008
+ Laravel config file, are not symbols yet.
1009
+ - **Strings follow PHP's escapes.** `'it\'s'` is `it's`, and `"caf\u{e9}"` is `café`. A heredoc or a nowdoc loses the
1010
+ closing marker's indent on each line. A string with a variable, such as `"v$major"` or `"{$a}"`, stays as written.
1011
+ So does a string whose bytes are not UTF-8, such as `"\xFF"`, and a string that PHP rejects.
1012
+ - **In a template, the symbols come from the PHP code.** The HTML around it is skipped.
1013
+ - **A syntax error stops the run for the definition that holds it, and for each type around it.** The other
1014
+ definitions still resolve. The parser fails on a constructor parameter with `readonly` but no visibility, such as
1015
+ `__construct(readonly int $id)`, so a path into its class stops the run.
1016
+
1017
+ <!-- </block> -->
1018
+
1019
+ ## Shell
1020
+
1021
+ <!-- <block name="shell-paths"> -->
1022
+
1023
+ ```bash
1024
+ #!/usr/bin/env bash
1025
+ GO_VERSION=1.22.5
1026
+ export REGISTRY='ghcr.io/acme'
1027
+ readonly IMAGE="${REGISTRY}/app:${GO_VERSION}"
1028
+ PORT="${PORT:-8080}"
1029
+ TARGETS=(linux darwin)
1030
+
1031
+ if [[ "$(uname)" == Darwin ]]; then
1032
+ SED=gsed
1033
+ else
1034
+ SED=sed
1035
+ fi
1036
+
1037
+ log() { echo "$@" >&2; }
1038
+
1039
+ while [[ $# -gt 0 ]]; do
1040
+ case "$1" in
1041
+ --go) GO_VERSION="$2"; shift 2 ;;
1042
+ esac
1043
+ done
1044
+ ```
1045
+
1046
+ | Path | Points at |
1047
+ |----------------|------------------------------------------------------|
1048
+ | `#/GO_VERSION` | `1.22.5`, as the copy in the loop doesn't count |
1049
+ | `#/REGISTRY` | `ghcr.io/acme` |
1050
+ | `#/IMAGE` | `"${REGISTRY}/app:${GO_VERSION}"`, as written |
1051
+ | `#/PORT` | `"${PORT:-8080}"`, as written |
1052
+ | `#/TARGETS` | `(linux darwin)`, as written |
1053
+ | `#/SED` | a violation, as both branches define it |
1054
+ | `#/log` | the whole function |
1055
+
1056
+ - **A variable or a function set outside functions, loops and subshells is a symbol.** The conditions and bodies of
1057
+ `if`, the items of `case`, `{ ... }` groups and the commands of `&&` and `||` count. So a name set in two branches
1058
+ is defined twice. Names set in `for`, `while` and `until` loops, in `( ... )`, in functions and in a statement that
1059
+ ends with `&` don't count, as bash sets them in a subshell or each time the loop runs.
1060
+ - **`export`, `readonly`, `declare` and `typeset` set a name too**, with or without flags such as `-r`. When the
1061
+ statement sets one name, the symbol covers the whole statement. In `export A=1 B=2`, `A` covers only `A=1`. The
1062
+ value is still the one written: bash stores `abc` for `declare -l X=ABC` and `3` for `declare -i X=1+2`, but the
1063
+ path gives `ABC` and `1+2`.
1064
+ - **These are not symbols:** `NAME+=value`, `A[0]=x`, `FOO=1 make` (it sets `FOO` only for `make`), `export NAME`
1065
+ without `=`, `local`, `: "${NAME:=default}"`, and names set by `read`, `for` or `getopts`.
1066
+ - **Strings follow bash's quoting.** `'a b'` is `a b`. In `"..."`, only `\$`, `` \` ``, `\"` and `\\` lose their
1067
+ backslash, and a `\` at the end of a line goes away with the line end. Outside quotes, every backslash goes:
1068
+ `a\ b` is `a b`. Parts written together are joined: `"a"'b'c` is `abc`. `X=` is the empty string.
1069
+ - **A value that bash expands stays as written**, such as `$HOME`, `$(cmd)`, `` `cmd` `` or `~/bin`. So does a word
1070
+ that starts with `~` after a quote, such as `"a"~/b`, and an array. Use `same-as-pattern` to take `8080` out of
1071
+ `"${PORT:-8080}"`.
1072
+ - **A path to a `$'...'` or `$"..."` string stops the run.**
1073
+ - **A function's name can hold `-`, `.` and `:`.** Write each `:` as `%3A`: `ns::helper` is `#/ns%3A%3Ahelper`.
1074
+ - **zsh files (`.zsh`, `.zshrc`) have no symbols.** The parser misreads much of zsh's syntax.
1075
+ - **After a syntax error, the parser often skips a large part of the file**, and every name in that part stops the
1076
+ run. It fails on `sed -e /^$/d`, on `${x/#$/y}`, and on a command whose name holds `::` after an assignment, such as
1077
+ `V=2 ns::log "x"`. A comment in backticks, such as `` find . `# skip vendor` -name x ``, is worse: the parser reads
1078
+ the rest of the file as the command's argument, so no name after it is found.
1079
+ - **A value outside quotes that goes on to the next line after a `\` is not found.** The parser reads `X=a\` and `b`
1080
+ on the next line as `X=a` set only for a command `b`. Bash sets `X=ab`. Put the value in quotes instead.
1081
+ - **A value that ends with a lone `$` takes in the next line.** In `Z=$` followed by `W=1`, `#/Z` gives `$`, the line
1082
+ end and `W=1`, as written, and `#/W` is not found. Bash sets `Z` to `$`. Write `Z='$'` instead.
1083
+
1084
+ <!-- </block> -->
1085
+
930
1086
  ---
931
1087
 
932
1088
  [← Return to README](../README.md)
@@ -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.16.6'],
9
+ install_requires=['blockwatch-cli==0.16.7'],
10
10
  # </block>
11
11
  # Without it, setuptools takes the directories under src/ for Python packages.
12
12
  packages=[],