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.
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/rust.yml +8 -5
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/CHANGELOG.md +33 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/Cargo.lock +1 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/Cargo.toml +1 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/PKG-INFO +1 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/README.md +1 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/blockwatch.toml +1 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/clippy.toml +3 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/ci.md +2 -2
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/cli.md +3 -3
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/symbols.md +43 -12
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/same-as.md +1 -1
- blockwatch_cli-0.21.0/rust-toolchain.toml +8 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/setup.py +1 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/virtual_block.rs +66 -25
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/cli/mod.rs +2 -2
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/diff/unified.rs +53 -36
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/comments.rs +13 -31
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/css.rs +11 -4
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/mod.rs +2 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/parsers.rs +58 -129
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/rust.rs +35 -26
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/yaml.rs +304 -21
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/run_report.rs +37 -31
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/skill.md +5 -5
- blockwatch_cli-0.21.0/src/symbols/mod.rs +2255 -0
- blockwatch_cli-0.21.0/src/symbols/path.rs +990 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/affects.rs +37 -37
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/check_ai.rs +10 -9
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/check_lua.rs +90 -49
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/keep_sorted.rs +44 -45
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/keep_unique.rs +22 -23
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/line_count.rs +13 -14
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/line_pattern.rs +16 -17
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/mod.rs +1 -1
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/run.rs +48 -62
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/same_as.rs +91 -91
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/targets.rs +27 -2
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/symbol_references.rs +9 -0
- blockwatch_cli-0.21.0/tests/testdata/symbol_references/filter_source.rs +14 -0
- blockwatch_cli-0.21.0/tests/testdata/symbol_references/filter_target.yaml +18 -0
- blockwatch_cli-0.21.0/tests/testdata/symbol_references/multi_doc_yaml_source.rs +19 -0
- blockwatch_cli-0.21.0/tests/testdata/symbol_references/multi_doc_yaml_target.yaml +13 -0
- blockwatch_cli-0.20.0/src/symbols/mod.rs +0 -1363
- blockwatch_cli-0.20.0/src/symbols/path.rs +0 -530
- blockwatch_cli-0.20.0/tests/testdata/symbol_references/filter_source.rs +0 -4
- blockwatch_cli-0.20.0/tests/testdata/symbol_references/filter_target.yaml +0 -5
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.agents/.claude-plugin/plugin.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.agents/skills/blockwatch/SKILL.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.claude-plugin/marketplace.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/FUNDING.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/dependabot.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/actions.lock +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/blockwatch.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/codeql.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/lockfile.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/markdownlint.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/pypi.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/release.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/sign-archives.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/site.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/workflows/trusted-checks.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.github/zizmor.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.gitignore +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.markdownlint-cli2.yaml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.pre-commit-config.yaml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/.pre-commit-hooks.yaml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/AGENTS.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/CLAUDE.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/LICENSE +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/SECURITY.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/codecov.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/demo.gif +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/dist-workspace.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/agents.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/README.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/affects.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/check-ai.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/check-lua.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/keep-sorted.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/keep-unique.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/line-count.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/docs/validators/line-pattern.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/pypi/pyproject.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/pyproject.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/release.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/scripts/check_language_count.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/scripts/check_latest_gpt_nano_model.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/keyword.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/line_count.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/mod.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/number.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/same_as.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/severity.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/sort.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/attributes/target_reference.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/address.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/from_comments.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/mod.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/blocks/tags.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/cli/flags.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/cli/path_arguments.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/config.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/diff/mod.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/diff/target_path.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/fs/glob.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/fs/mod.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/fs/path_filter.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/bash.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/c.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/c_sharp.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/cmake.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/code_symbols.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/cpp.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/dart.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/dockerfile.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/elixir.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/file_names.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/go.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/graphql.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/groovy.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/hcl.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/html.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/java.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/javascript.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/json.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/kotlin.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/lean.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/lua.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/makefile.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/markdown.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/mdx.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/nix.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/ocaml.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/php.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/proto.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/python.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/ruby.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/scala.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/sql.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/starlark.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/swift.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/syntax_tree.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/toml.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/tsx.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/typescript.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/languages/xml.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/lib.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/main.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/explain.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/listing.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/mod.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/output/sarif.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/position.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/repo_path.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/scan.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/settings.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/context.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/log.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/pattern_values.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/validator.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/violation.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/src/validators/violation_address.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/affects.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/check_ai.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/check_lua.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/common/empty.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/common/mod.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/config.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/encoding.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/explain.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/general.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/keep_sorted.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/keep_unique.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/line_count.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/line_pattern.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/list.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/path_arguments.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/repository_root.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/same_as.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/sarif.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/skill.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/suppressions.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/cross_file_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/cross_file_target.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/custom_ext_source.javascript +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/custom_ext_target.javascript +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/dangling.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/missing_symbol.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/more_added_than_deleted.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/multiline_tag_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/multiline_tag_target.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/nested_mapping_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/nested_mapping_target.yaml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/sibling.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/symbol_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/symbol_target.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/table_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/table_target.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/tag_and_content_source.ts +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/tag_and_content_target.ts +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/whole_file_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/affects/whole_file_target.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_ai/two_blocks.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/affects.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/affects.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/affects_drift.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/blocking_io.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/blocking_io.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/echo.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/fail.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/mode.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/os.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pathfmt/report_path.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pathfmt/source.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pattern.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pattern_many_matches.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/pattern_no_match.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/success.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/check_lua/success_and_failure.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/config.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/package.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/plugins/blue/package.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/plugins/green/package.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/glob_target/plugins/red/package.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_patterns/config.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_patterns/services/a/.env +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_patterns/services/b/.env +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_symbol_change/a.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/config/target_if_symbol_change/config.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/explain/a.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/explain/check.lua +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/block_selection.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/custom_file_extension.javascript +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/custom_file_extension.python +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/disable_enable.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/paths/invalid.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/paths/subdir/nested_invalid.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/paths/valid.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/general/severity.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/hidden/.github/workflows/ci.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/keep_sorted/orderings.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/keep_unique/basic_and_pattern.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/line_count/equality_and_greater_than.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/line_pattern/forbidden_text.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/line_pattern/hex_and_word_patterns.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/list/.hg/.gitkeep +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/list/a.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/list/b.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/positions/unicode_columns.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/custom_ext_source.javascript +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/custom_ext_target.javascript +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/package.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths/alpha/item.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths/beta/item.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths_and_block_source.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/paths_source.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/sibling.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/split_table_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/split_table_target.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/symbol_mismatch_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/symbol_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/target.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/whole_file_mismatch_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/whole_file_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/same_as/whole_file_target.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/advisory.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/clean.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/sorted.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/sarif/unnamed.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_gone_a.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_gone_b.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_lowercase_trailer.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_malformed.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/commit_msg_with_noise.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/dangling.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/sorted.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/symbol.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/symbol_target.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/two_rules.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/suppressions/unnamed.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/Dockerfile +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/Makefile +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/bzl_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/bzl_target.bzl +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/c_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/c_target.c +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cpp_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cpp_target.cpp +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cs_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/cs_target.cs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/csproj_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/csproj_target.csproj +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/css_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/css_target.css +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/dart_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/dart_target.dart +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/dockerfile_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/escapes_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/escapes_target.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/go_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/go_target.go +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/h_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/h_target.h +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/hcl_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/hcl_target.hcl +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/java_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/java_target.java +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/js_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/js_target.js +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/json_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/json_target.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/jsonc_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/jsonc_target.jsonc +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kt_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kt_target.kt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kts_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/kts_target.kts +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/makefile_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/markdown_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/markdown_target.markdown +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/md_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/md_target.md +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mdx_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mdx_target.mdx +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mixed_list_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/mixed_list_target.json +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/nomad_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/nomad_target.nomad +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/php_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/php_target.php +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/phtml_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/phtml_target.phtml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/proto_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/proto_target.proto +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/py_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/py_target.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/rs_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/rs_target.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/sh_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/sh_target.sh +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/swift_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/swift_target.swift +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tf_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tf_target.tf +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tfvars_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tfvars_target.tfvars +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tofu_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tofu_target.tofu +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/toml_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/toml_target.toml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/ts_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/ts_target.ts +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tsx_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/tsx_target.tsx +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/xml_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/xml_target.xml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yaml_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yaml_target.yaml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yml_source.rs +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/symbol_references/yml_target.yml +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/affects/pair.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/counted.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/noop.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/notes.txt +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/clean/sorted.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/diff/two_blocks.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/failing/unsorted.py +0 -0
- {blockwatch_cli-0.20.0 → blockwatch_cli-0.21.0}/tests/testdata/verbosity/mixed/both_kinds.py +0 -0
- {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
|
-
-
|
|
25
|
-
|
|
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:
|
|
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
|
|
@@ -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/
|
|
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.
|
|
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.
|
|
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.
|
|
687
|
-
"semanticVersion": "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.
|
|
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.**
|
|
106
|
-
|
|
107
|
-
|
|
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
|
-
- **
|
|
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
|
|
119
|
-
as one with a syntax error, also stops
|
|
120
|
-
- **The value starts after the first `=` and ends at the
|
|
121
|
-
|
|
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
|
-
|
|
226
|
-
|
|
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
|
|
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.
|
|
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::
|
|
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 =
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
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(
|
|
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(
|
|
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
|
|
149
|
-
|
|
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
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
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(
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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(
|
|
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,
|