pyvbaanalysis 2.2.1__tar.gz → 2.3.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.
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/CHANGELOG.md +128 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/CONTRIBUTING.md +17 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/PKG-INFO +1 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/docs/diagnostics-catalogue.md +40 -6
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/__init__.py +1 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/completion/member_access.py +363 -86
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/conditional/__init__.py +2 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/conditional/conditional_compilation.py +50 -22
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/constants/integer_constant_expression.py +23 -9
- pyvbaanalysis-2.3.0/pyvbaanalysis/data/access_host_model.json +1 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/diagnostic_influence_audit.json +511 -2
- pyvbaanalysis-2.3.0/pyvbaanalysis/data/excel_host_model.json +1 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/data/host_closed_types.json +646 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/manifest.json +79 -11
- pyvbaanalysis-2.3.0/pyvbaanalysis/data/powerpoint_host_model.json +1 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/rule_metadata.json +395 -2
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/vba_runtime_tables.json +1 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/vbe_oracle_cases.json +1793 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/data/word_host_model.json +1 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/analyze_module.py +31 -8
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/argument_inference.py +73 -9
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/call_extraction.py +6 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/callable_signatures.py +37 -2
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/context.py +5 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/dataflow.py +101 -48
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/exprwalk.py +31 -30
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/known_locals.py +274 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/module_analysis.py +106 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/registry.py +48 -5
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/arrays.py +572 -86
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/assignments.py +176 -15
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/collection_state.py +399 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/control_flow.py +104 -81
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/dead_code.py +85 -73
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/declaration_forms.py +211 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/declarations.py +116 -46
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/directive_forms.py +105 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/duplicates.py +38 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/expressions.py +387 -17
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/file_statements.py +397 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/handler_flow.py +345 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/host_arguments.py +749 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/implements_members.py +275 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/late_bound_members.py +234 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/line_continuations.py +127 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/module_kind.py +28 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/numeric_literals.py +277 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/object_state.py +146 -14
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/overflow.py +1025 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/runtime_values.py +964 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/shared.py +27 -25
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/statement_forms.py +190 -0
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/stray_tokens.py +162 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/type_of_is.py +113 -22
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/undeclared.py +90 -10
- pyvbaanalysis-2.3.0/pyvbaanalysis/diagnostics/rules/variant_values.py +189 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/walker.py +18 -22
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/flow/procedure_labels.py +22 -11
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/flow/procedure_unstructured.py +6 -13
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/host/__init__.py +2 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/host/host_model.py +13 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/host/type_extensibility.py +36 -12
- pyvbaanalysis-2.3.0/pyvbaanalysis/js_compat.py +111 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/keyword_table.py +7 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/token_kinds.py +3 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/tokenize.py +20 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/parser/nodes.py +54 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/parser/parse_module.py +233 -39
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/parser/parser_state.py +49 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/runtime/vba_runtime.py +12 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/symbols/build_module_symbols.py +3 -7
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/symbols/name_resolution.py +25 -6
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/symbols/project_index.py +34 -6
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/symbols/symbol_model.py +5 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/types/type_inference.py +9 -5
- pyvbaanalysis-2.3.0/tests/test_analyzer_lexes_module_once.py +52 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_conditional_arms.py +3 -2
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_dataflow.py +16 -0
- pyvbaanalysis-2.3.0/tests/test_deep_nesting.py +171 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_diagnostics_engine.py +3 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_evidence.py +2 -2
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_host_libraries.py +3 -1
- pyvbaanalysis-2.3.0/tests/test_member_access_chains.py +176 -0
- pyvbaanalysis-2.3.0/tests/test_module_analysis.py +122 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_registry_parity.py +12 -4
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rule_metadata.py +5 -5
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_argument_types.py +9 -2
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_assignments_types.py +5 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_control_flow.py +8 -3
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_declarations.py +3 -1
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_property_setter_value_parameters.py +10 -12
- pyvbaanalysis-2.3.0/tests/test_upstream_sync_10_12_0.py +721 -0
- pyvbaanalysis-2.3.0/tests/test_upstream_sync_10_13_0.py +45 -0
- pyvbaanalysis-2.3.0/tests/test_upstream_sync_10_14_0.py +277 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_upstream_sync_10_6_0.py +3 -3
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/extract_host_model.mjs +18 -6
- pyvbaanalysis-2.2.1/pyvbaanalysis/data/access_host_model.json +0 -1
- pyvbaanalysis-2.2.1/pyvbaanalysis/data/excel_closed_types.json +0 -31
- pyvbaanalysis-2.2.1/pyvbaanalysis/data/excel_host_model.json +0 -1
- pyvbaanalysis-2.2.1/pyvbaanalysis/data/powerpoint_host_model.json +0 -1
- pyvbaanalysis-2.2.1/pyvbaanalysis/data/word_host_model.json +0 -1
- pyvbaanalysis-2.2.1/pyvbaanalysis/diagnostics/rules/numeric_literals.py +0 -49
- pyvbaanalysis-2.2.1/pyvbaanalysis/diagnostics/rules/runtime_values.py +0 -384
- pyvbaanalysis-2.2.1/tests/test_member_access_chains.py +0 -45
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/.gitattributes +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/.github/dependabot.yml +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/.github/workflows/ci.yml +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/.github/workflows/publish.yml +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/.gitignore +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/LICENSE +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/README.md +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/docs/api-reference.md +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/docs/usage.md +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyproject.toml +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/__main__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/call/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/call/call_context.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/cli.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/completion/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/completion/cursor_context.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/completion/event_handlers.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/completion/type_completion.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/constants/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/event_definitions.json +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/msforms_members.json +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/data/vb6_host_model.json +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/const_expr.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/inline_suppression.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/model.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rule_metadata.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/argument_shape.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/argument_types.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/binary_operand_scalar.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/call_arity.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/doc_comments.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/late_binding.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/lexical.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/missing_reference.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/diagnostics/rules/parameter_defaults.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/docs/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/docs/doc_comment.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/evidence.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/flow/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/host/host_libraries.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/host/host_registry.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/host/msforms.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/identity_cache.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/contextual_keywords.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/stripped_lines.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/token_helpers.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/lexer/trivia.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/parser/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/parser/fixed_length_string.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/parser/parse_expression.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/parser/type_declaration_suffix.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/project.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/py.typed +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/reader/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/reader/loose_file.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/reader/vbe_module.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/reader/workbook.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/references/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/references/reference_kinds.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/runtime/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/symbols/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/symbols/user_form_controls.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/types/__init__.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/pyvbaanalysis/types/type_names.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/conftest.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/oracle_support.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_cli.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_conditional_compilation.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_host_model.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_host_seam.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_inline_suppression.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_integer_constant_expression.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_language_matrix.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_lexer.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_parser.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_project.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_project_index.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_public_api.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_reader.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_real_world_false_positives.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_reference_kinds.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_ambiguous_enum_member.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_argument_shape.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_arrays.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_assignments.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_binary_operand_scalar.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_call_arity.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_dead_code.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_division_by_zero.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_doc_comments.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_duplicates.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_event_handler_module_scope.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_expression_calls.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_expressions.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_invalid_as_type_names.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_is_operator_non_object.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_late_binding.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_lexical.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_member_not_found.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_missing_reference.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_module_kind.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_numeric_literals.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_object_state.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_parameter_defaults.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_runtime_values.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_scalar_and_foreach.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_type_of_is.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_typeof_is_always_false.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_rules_undeclared.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_runtime_tables.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_statement_token_derivation.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_stripped_lines.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_symbols.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_token_helpers.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_type_completion.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_type_names.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_upstream_sync_10_5_0.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_upstream_sync_10_7_1.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tests/test_upstream_sync_6_1_2.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/extract_event_definitions.mjs +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/extract_rule_metadata.mjs +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/extract_runtime_tables.mjs +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/generate_diagnostics_catalogue.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/generate_manifest.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/oracle/build_combining_mark_probe.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/pin_analyzer.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/vendor_data.py +0 -0
- {pyvbaanalysis-2.2.1 → pyvbaanalysis-2.3.0}/tools/xlide_source.mjs +0 -0
|
@@ -5,6 +5,134 @@ All notable changes to pyVBAanalysis are recorded here. The format follows
|
|
|
5
5
|
follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html): a minor version
|
|
6
6
|
per milestone.
|
|
7
7
|
|
|
8
|
+
## 2.3.0 - 2026-09-26
|
|
9
|
+
|
|
10
|
+
Sync to XLIDE 10.14.0 (commit 110c76e), from 10.7.1. Upstream measured the
|
|
11
|
+
analyzer against Excel, Word and PowerPoint 16.0 (build 20326) through
|
|
12
|
+
pyVBAharness and answered each finding (XLIDE issues #96 to #148): 34 new
|
|
13
|
+
diagnostics, 19 of them runtime errors in code the VBE compiles, and false
|
|
14
|
+
positives removed on code that compiles and runs. XLIDE 10.7.2, 10.8.0, 10.11.0
|
|
15
|
+
and 10.12.0 changed nothing the port reads.
|
|
16
|
+
|
|
17
|
+
The port now returns what XLIDE shows, not its raw rule list, and it analyzes
|
|
18
|
+
procedures nested past Python's recursion limit and long With blocks and member
|
|
19
|
+
chains in linear time.
|
|
20
|
+
|
|
21
|
+
### Added
|
|
22
|
+
|
|
23
|
+
* Nineteen runtime errors in code the VBE compiles, each reported as "This will
|
|
24
|
+
raise Run-time error ...":
|
|
25
|
+
* Overflow (#116): `arithmetic-overflow` for Integer arithmetic such as
|
|
26
|
+
`60 * 60 * 24`, an assignment that rounds past its target, and conversions
|
|
27
|
+
out of range; `for-counter-overflow` for `For i = 1 To 32767` on an Integer.
|
|
28
|
+
* Control flow (#117): `handler-fall-through` into an error handler that
|
|
29
|
+
re-raises, `resume-without-error`, `return-without-gosub`, and
|
|
30
|
+
`recursive-property-accessor`.
|
|
31
|
+
* Collections and Variants (#121): `collection-index-out-of-range`,
|
|
32
|
+
`collection-key-not-found`, `collection-key-in-use`, `variant-value-misuse`
|
|
33
|
+
and `runtime-member-not-found` (438 on a late-bound object).
|
|
34
|
+
* Host arguments (#122): `host-argument-out-of-range` for index 0 into a
|
|
35
|
+
1-based Office collection, `Cells(0, 1)` or an Offset off the sheet;
|
|
36
|
+
`multi-cell-range-as-scalar`; `sheet-name-invalid`.
|
|
37
|
+
* File statements (#123): `file-number-zero`, `file-used-after-close`,
|
|
38
|
+
`file-mode-mismatch`, `file-already-open` and `file-record-zero`.
|
|
39
|
+
* Fifteen compile errors: `const-overflow` (#116); `array-parameter-form`,
|
|
40
|
+
`bracketed-variable-name` and `duplicate-deftype` (#124);
|
|
41
|
+
`collection-operand`, `sub-used-as-value`, `implements-member-missing`,
|
|
42
|
+
`implements-member-signature` and `rem-after-then` (#125);
|
|
43
|
+
`directive-trailing-statement` and `duplicate-const-directive` (#130);
|
|
44
|
+
`stray-character` for characters VBA does not use and a no-break space
|
|
45
|
+
(#132); `line-too-long`, `date-literal-invalid` and `float-literal-overflow`
|
|
46
|
+
(#133).
|
|
47
|
+
* Existing rules report more of what the code states (#118 to #120, #124 to
|
|
48
|
+
#126): `Asc("")`, `Sqr(-1)`, `Log(0)`, `CLng("abc")`, `"abc" + 1` into a
|
|
49
|
+
Variant, a divisor local that holds 0, array bounds known from `Split`,
|
|
50
|
+
`Array` or a Range literal's `Value`, `ReDim a(-1)`, `Next i, j` out of
|
|
51
|
+
order, and the line continuations the VBE refuses.
|
|
52
|
+
* `AnalyzeModuleOptions.raw_rule_output`: the rules' own list, as upstream's
|
|
53
|
+
`analyzeModule` returns it, without the two steps below.
|
|
54
|
+
* `resolve_host_member` in `pyvbaanalysis.host`, and `declaredType` on a host
|
|
55
|
+
model member: the type its library declares, where the model's `returns`
|
|
56
|
+
is repaired from the reference documentation.
|
|
57
|
+
|
|
58
|
+
### Changed
|
|
59
|
+
|
|
60
|
+
* `analyze_module`, and everything built on it, returns what XLIDE shows. A
|
|
61
|
+
runtime-error finding under `On Error Resume Next`, from that statement to the
|
|
62
|
+
next `On Error` or the end of the procedure, is dropped, since the error is
|
|
63
|
+
raised and handled there (`n = UBound(a)` is the usual allocated-array
|
|
64
|
+
test, XLIDE issue #106). Findings with one code and span are merged, the later
|
|
65
|
+
one kept. `diagnostics/module_analysis.py` ports both from XLIDE's
|
|
66
|
+
`analyzeVbaModuleSource`.
|
|
67
|
+
* `member-not-found` works in Word, PowerPoint and Access: their models carry
|
|
68
|
+
the type libraries' hidden members and prove a member absent where the
|
|
69
|
+
library marks the interface NONEXTENSIBLE (#127). Document, Form, Report and
|
|
70
|
+
Control stay open. The data file `excel_closed_types.json` is replaced by
|
|
71
|
+
`host_closed_types.json`, which covers all four hosts.
|
|
72
|
+
* A host member the type library declares `As Object`, such as `ActiveSheet`
|
|
73
|
+
or a `Worksheets(1)` item, is late bound (#114).
|
|
74
|
+
* A hex or octal literal is the signed value of its bits: `&H8000` is -32768
|
|
75
|
+
and `&H80000000` is -2147483648 (#141). `parse_vba_integer_literal` returns
|
|
76
|
+
that value.
|
|
77
|
+
* The parser opens and closes a block written in a one-line If's tail (#128),
|
|
78
|
+
reads `Else:` as the If's Else (#129), counts a block keyword restated in both
|
|
79
|
+
arms of an `#If` once (#130), and reads a numbered one-line If with an `=`
|
|
80
|
+
condition as an If (#131).
|
|
81
|
+
* An Enum value or Optional default keeps its leading number, so `= 300 - 100`
|
|
82
|
+
is not the literal -100, and a module's Consts fold once with a procedure's
|
|
83
|
+
own Consts layered on top (XLIDE 10.13.0).
|
|
84
|
+
|
|
85
|
+
### Fixed
|
|
86
|
+
|
|
87
|
+
* False positives on code the VBE compiles and runs (#96 to #115): `Choose` and
|
|
88
|
+
`Switch` arity, `Open path` without `For`, `On Local Error`, a ReDim that
|
|
89
|
+
declares its array, `total&+1`, a library qualifier such as `Excel.`, a
|
|
90
|
+
`#Const` never defined, DAO constants in Access, `Left(Null, 1)`, a string
|
|
91
|
+
into a Byte array, a division the code guards, the Let and Set pairings of a
|
|
92
|
+
property, Nothing tracking past a GoSub or an early `Exit For`, two project
|
|
93
|
+
types sharing an instance, a Public Enum in a class, a Const or parenthesized
|
|
94
|
+
ByRef argument, `Len` in an Enum value, Option placement after a Deftype, and
|
|
95
|
+
a Function's return assigned by For, ReDim, `Line Input #` or `Get #`.
|
|
96
|
+
* False positives found by this port's own hunt and fixed upstream in 10.14.0
|
|
97
|
+
(#140 to #147): `If c Is Nothing Then Set c = New Collection`, `Set a(i) = c`
|
|
98
|
+
and `AddressOf` a Sub reported as compile errors; Win32 flag Enums such as
|
|
99
|
+
`GENERIC_READ = &H80000000` as Overflow; `Err.Raise vbObjectError + 513` as
|
|
100
|
+
error 5; the `;` of `If x Then Debug.Print a; b`; a string default holding a
|
|
101
|
+
comma in an Implements signature; `32000 \ 2 * 4` folded at the wrong
|
|
102
|
+
precedence; a For counter in a loop that leaves through `Exit For`; a file
|
|
103
|
+
reopened after `Reset` or a closing helper, an error handler's `Print #`,
|
|
104
|
+
and hex file numbers; and an item added through `Set o = c`.
|
|
105
|
+
* Misses from the same issues: `1 Mod 200 * 200` (error 6), `Resume Next`
|
|
106
|
+
after `On Error GoTo -1` (20), a `Print #` after `Reset` (52), a duplicate
|
|
107
|
+
key added through an alias (457), and a read-write interface property
|
|
108
|
+
implemented with its Get alone.
|
|
109
|
+
* `analyze_project` raised RecursionError on a procedure nested about 490 blocks
|
|
110
|
+
deep, where the VBE compiles a thousand. Every walk over a procedure body now
|
|
111
|
+
runs on an explicit stack, and `tests/test_deep_nesting.py` fails on one that
|
|
112
|
+
recurses per block.
|
|
113
|
+
|
|
114
|
+
### Performance
|
|
115
|
+
|
|
116
|
+
* A long With block and a long member chain are analyzed in linear time: the
|
|
117
|
+
pass keeps upstream's With-scan index (XLIDE issue #134) and receiver-chain
|
|
118
|
+
results (#135). A 500-line With block took 14.2 seconds in 2.2.1 and takes
|
|
119
|
+
0.19; a 3,000-member chain took 16 seconds and takes 0.56.
|
|
120
|
+
* Expression strings the parser carried on their own are lexed without
|
|
121
|
+
evicting the module from the token cache, and a test fails if one pass lexes
|
|
122
|
+
a module twice (#139). On two parts of the differential corpus's Office files
|
|
123
|
+
(66 modules), 2.3.0 is 12% faster than 2.2.1, new rules included.
|
|
124
|
+
|
|
125
|
+
### Verified
|
|
126
|
+
|
|
127
|
+
* Upstream's own 10.14.0 test suite, recorded and replayed through the port:
|
|
128
|
+
1419 standalone and 992 project calls, identical in code, span and message.
|
|
129
|
+
* The oracle corpus (2155 diagnostics in 1229 modules), 16 real workbooks, 195
|
|
130
|
+
Office files of every host, 693 further projects (948 modules) and 7 VB6
|
|
131
|
+
projects: identical findings from both analyzers, compared at what XLIDE
|
|
132
|
+
shows.
|
|
133
|
+
* Every expectation in the new sync tests was also run through the pinned
|
|
134
|
+
upstream analyzer.
|
|
135
|
+
|
|
8
136
|
## 2.2.1 - 2026-09-23
|
|
9
137
|
|
|
10
138
|
Sync to XLIDE 10.7.1 (commit 6ead73d), from 10.6.0. Upstream fixed how its
|
|
@@ -80,7 +80,8 @@ python tools/differential/harness.py projects artifacts/differential/cases/mine.
|
|
|
80
80
|
the port, rebuilding the project index behind a call made with project context,
|
|
81
81
|
and compares the diagnostics by code, span and message. It finds the gaps
|
|
82
82
|
nothing else exercises: whole checks never ported, fixes older than the last
|
|
83
|
-
sync point.
|
|
83
|
+
sync point. The recorded calls are the rules alone, so the port is asked for its
|
|
84
|
+
`raw_rule_output`.
|
|
84
85
|
* `corpus` runs the oracle corpus through both analyzers, each module standalone
|
|
85
86
|
and with its case's modules as a project.
|
|
86
87
|
* `cases` turns Office files, and folders searched for them and for exported
|
|
@@ -88,6 +89,16 @@ python tools/differential/harness.py projects artifacts/differential/cases/mine.
|
|
|
88
89
|
block of upstream's syntax corpus, and `--host` names a host for the cases no
|
|
89
90
|
file implies one for. `projects` runs a cases file through both analyzers.
|
|
90
91
|
|
|
92
|
+
`corpus` and `projects` compare what XLIDE shows. Upstream runs its rules
|
|
93
|
+
through `analyzeVbaModuleSource`, which drops a runtime-error finding under
|
|
94
|
+
`On Error Resume Next` and merges findings with one code and span, as
|
|
95
|
+
`analyze_module` does (`pyvbaanalysis/diagnostics/module_analysis.py`). Its own
|
|
96
|
+
additions the port leaves out, the structural block-balance pass and XLIDE's test
|
|
97
|
+
and suppression directives, are cut from its list by keeping only what its rules
|
|
98
|
+
produced (`tools/differential/upstream/shown.mjs`). One step the port lacks does
|
|
99
|
+
remove findings: a procedure marked `'@xlide-test expected-error=N` hides a runtime
|
|
100
|
+
finding for error N. No corpus has one.
|
|
101
|
+
|
|
91
102
|
`replay`, `corpus` and `projects` exit 1 when anything differs and print what only
|
|
92
103
|
one side reports. Where the port reports more, the port is wrong. Where upstream
|
|
93
104
|
reports more it may be an upstream false positive, so check before porting it.
|
|
@@ -104,6 +115,11 @@ run ends. `harness.py unpatch` restores a pin a run left patched, and
|
|
|
104
115
|
## Adding or changing a rule
|
|
105
116
|
|
|
106
117
|
* Port the rule from its XLIDE source; match the behavior, not just the shape.
|
|
118
|
+
* Walk a procedure body with `iter_body_nodes` or `iter_body_nodes_in_context`
|
|
119
|
+
(`pyvbaanalysis/parser/nodes.py`), not with a function that calls itself for
|
|
120
|
+
each nested block. XLIDE's walks recurse, which JavaScript's stack absorbs;
|
|
121
|
+
Python stops at 1,000 frames, and the VBE compiles blocks nested a thousand
|
|
122
|
+
deep. `tests/test_deep_nesting.py` fails on a walk that recurses per block.
|
|
107
123
|
* A rule ships only with oracle backing. Validate it against the vendored corpus
|
|
108
124
|
and add direct tests for the positive and the no-false-positive control cases.
|
|
109
125
|
* The diagnostic rule registry order is a contract: it is the diagnostic
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: pyvbaanalysis
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.3.0
|
|
4
4
|
Summary: Pure-Python static analysis for Excel VBA
|
|
5
5
|
Project-URL: Homepage, https://github.com/WilliamSmithEdward/pyVBAanalysis
|
|
6
6
|
Project-URL: Repository, https://github.com/WilliamSmithEdward/pyVBAanalysis
|
|
@@ -1,20 +1,24 @@
|
|
|
1
1
|
# Diagnostic catalogue
|
|
2
2
|
|
|
3
|
-
The diagnostic codes pyVBAanalysis can emit, generated from the rule metadata (`tools/generate_diagnostics_catalogue.py`). This table lists the
|
|
3
|
+
The diagnostic codes pyVBAanalysis can emit, generated from the rule metadata (`tools/generate_diagnostics_catalogue.py`). This table lists the 165 rule-metadata codes across 6 categories. A further 3 structural block-balance codes (`mismatched-end-keyword`, `missing-block-closer`, `unmatched-block-closer`) are emitted by the parser pass and are not in the metadata table, for a full set of 168 codes.
|
|
4
4
|
|
|
5
5
|
Each code is reported only when it is provably correct; anything unknown or ambiguous stays quiet (the no-false-positive discipline). The **kind** column says what a code means: a *compile error* is rejected by the VBE compiler, a *runtime error* is a deterministic Run-time error, a *runtime risk* is a likely fault, and *style* is advisory.
|
|
6
6
|
|
|
7
7
|
Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or the `severity_overrides` argument of `analyze_project` / the reader functions), keyed by code. Use `"off"`, `"information"`, `"warning"`, or `"error"`; the allowed values per code are constrained by policy (some codes can be downgraded but not disabled). See [docs/usage.md](usage.md).
|
|
8
8
|
|
|
9
|
-
## Declaration (
|
|
9
|
+
## Declaration (46)
|
|
10
10
|
|
|
11
11
|
| Code | Title | Default | Kind | Spec reference |
|
|
12
12
|
| --- | --- | --- | --- | --- |
|
|
13
|
+
| `array-parameter-form` | Array parameter cannot be ByVal or Optional | error | compile error | MS-VBAL 5.3.1.5; VBE "Array argument must be ByRef" / "Optional argument must be Variant or intrinsic type with a default value" (issue #124, Excel 16.0) |
|
|
13
14
|
| `byval-udt-parameter` | User-defined type parameter cannot be ByVal | error | compile error | MS-VBAL 5.3.1 (parameter passing) / VBE compiler |
|
|
15
|
+
| `const-overflow` | Const value overflows | error | compile error | MS-VBAL 5.6.9.3; VBE compile error: Overflow (issue #116, Excel 16.0) |
|
|
14
16
|
| `const-value-not-constant` | Const value must be a constant expression | error | compile error | MS-VBAL 5.2.4 (Const declaration value is a constant-expression) |
|
|
15
17
|
| `declare-missing-ptrsafe` | Declare statement missing PtrSafe for 64-bit Office | error | compile error | VBA 7 Declare statement PtrSafe requirement for 64-bit Office |
|
|
16
18
|
| `dim-initializer` | Declaration cannot include an initializer (VB.NET syntax) | error | compile error | MS-VBAL 5.2.3.1 |
|
|
19
|
+
| `duplicate-const-directive` | Duplicate #Const | error | compile error | MS-VBAL 3.4.1 #Const; VBE "Duplicate definition" (issue #130, Excel 16.0) |
|
|
17
20
|
| `duplicate-declaration` | Duplicate declaration in the current scope | error | compile error | MS-VBAL 5.2 / 5.3 |
|
|
21
|
+
| `duplicate-deftype` | Duplicate Deftype statement | error | compile error | MS-VBAL 5.2.3.1.3; VBE "Duplicate Deftype statement" (issue #124, Excel 16.0) |
|
|
18
22
|
| `duplicate-enum-member` | Duplicate Enum member | error | compile error | MS-VBAL 5.2.3.4 |
|
|
19
23
|
| `duplicate-module-variable` | Duplicate module-level declaration | error | compile error | MS-VBAL 5.2.3 |
|
|
20
24
|
| `duplicate-option` | Duplicate Option statement | error | compile error | MS-VBAL 5.2.1 (module options) |
|
|
@@ -34,7 +38,7 @@ Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or th
|
|
|
34
38
|
| `module-declaration-after-procedure` | Module-level declaration after procedure | error | compile error | MS-VBAL 5.2 / 5.3 |
|
|
35
39
|
| `module-declaration-in-procedure` | Module-level declaration inside procedure | error | compile error | MS-VBAL 5.2 / 5.3 |
|
|
36
40
|
| `object-module-public-member` | Invalid public member in object module | error | compile error | VBE compiler: public object-module member restrictions |
|
|
37
|
-
| `option-after-declaration` | Option statement
|
|
41
|
+
| `option-after-declaration` | Option statement after a procedure | error | compile error | MS-VBAL 5.2.1 |
|
|
38
42
|
| `optional-udt-parameter` | Optional parameter cannot be a user-defined type | error | compile error | MS-VBAL 5.3.1 (Optional parameter) / VBE compiler |
|
|
39
43
|
| `paramarray-non-variant` | ParamArray elements must be Variant | error | compile error | MS-VBAL 5.3.1.6 |
|
|
40
44
|
| `paramarray-not-last` | ParamArray must be the final parameter | error | compile error | MS-VBAL 5.3.1.6 |
|
|
@@ -70,7 +74,7 @@ Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or th
|
|
|
70
74
|
| `undeclared-variable` | Variable not defined | error | compile error | MS-VBAL 5.2.4.1.1 |
|
|
71
75
|
| `unknown-call` | Sub or Function not defined | error | compile error | MS-VBAL 5.4.2.1 |
|
|
72
76
|
|
|
73
|
-
## Semantic (
|
|
77
|
+
## Semantic (75)
|
|
74
78
|
|
|
75
79
|
| Code | Title | Default | Kind | Spec reference |
|
|
76
80
|
| --- | --- | --- | --- | --- |
|
|
@@ -80,6 +84,7 @@ Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or th
|
|
|
80
84
|
| `argument-object-type-mismatch` | Object argument type mismatch | error | compile error | MS-VBAL 5.3.1 |
|
|
81
85
|
| `argument-shape-mismatch` | Argument shape (array/Type vs scalar) mismatch | error | compile error | MS-VBAL 5.3.1 (argument passing) / VBE compiler: ByRef argument type mismatch; array or user-defined type expected |
|
|
82
86
|
| `argument-type-mismatch` | Argument type mismatch | error | runtime error | MS-VBAL 5.3.1 / runtime type coercion and numeric overflow |
|
|
87
|
+
| `arithmetic-overflow` | Arithmetic overflow | error | runtime error | MS-VBAL 5.6.9.3 operator result types; VBE runtime error 6: Overflow (issue #116, Excel 16.0) |
|
|
83
88
|
| `array-assignment-to-scalar` | Array cannot be assigned to scalar | error | compile error | MS-VBAL 5.4.3 / VBE compiler: Type mismatch |
|
|
84
89
|
| `array-bound-requires-array` | Array bound function requires array | error | compile error | MS-VBAL LBound/UBound / VBE compiler: Expected array |
|
|
85
90
|
| `array-declaration-impossible-bounds` | Array declaration lower bound is greater than upper bound | error | compile error | MS-VBAL 5.2.3.1 (array declaration bounds) |
|
|
@@ -88,6 +93,10 @@ Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or th
|
|
|
88
93
|
| `assignment-type-mismatch` | Assignment type mismatch | error | runtime error | MS-VBAL 5.4.3 / runtime type coercion and numeric overflow |
|
|
89
94
|
| `byref-argument-type-mismatch` | ByRef argument type mismatch | error | compile error | MS-VBAL 5.3.1 / VBE compiler: ByRef argument type mismatch |
|
|
90
95
|
| `case-outside-select` | Case statement outside Select Case | error | compile error | MS-VBAL 5.4.2.4 |
|
|
96
|
+
| `collection-index-out-of-range` | Collection index out of range | error | runtime error | VBE runtime errors 5 and 9 on VBA.Collection (issue #121, Excel 16.0) |
|
|
97
|
+
| `collection-key-in-use` | Collection key already in use | error | runtime error | VBE runtime error 457 on VBA.Collection (issue #121, Excel 16.0) |
|
|
98
|
+
| `collection-key-not-found` | Collection key not found | error | runtime error | VBE runtime error 5 on VBA.Collection (issue #121, Excel 16.0) |
|
|
99
|
+
| `collection-operand` | Collection used as an operand | error | compile error | VBE "Argument not optional" on a Collection whose default member Item takes an index (issue #125, Excel 16.0) |
|
|
91
100
|
| `const-assignment` | Assignment to a constant | error | compile error | MS-VBAL 5.4.3.1 |
|
|
92
101
|
| `division-by-zero` | Division by zero | error | runtime error | MS-VBAL 5.6 / runtime division by zero |
|
|
93
102
|
| `duplicate-case-else` | Duplicate Case Else in Select Case | error | compile error | MS-VBAL 5.4.2.10 (Select Case) |
|
|
@@ -96,9 +105,19 @@ Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or th
|
|
|
96
105
|
| `erase-requires-array` | Erase target must be array or Variant | error | compile error | MS-VBAL Erase statement / VBE compiler: Expected array |
|
|
97
106
|
| `exit-outside-block` | Loop exit statement outside matching loop | error | compile error | MS-VBAL 5.4.1.3 |
|
|
98
107
|
| `exit-wrong-proc` | Exit statement does not match the enclosing procedure | error | compile error | MS-VBAL 5.4.1.3 |
|
|
108
|
+
| `file-already-open` | File number opened twice | error | runtime error | VBE runtime error 55: File already open (issue #123, Excel 16.0) |
|
|
109
|
+
| `file-mode-mismatch` | File statement the open mode forbids | error | runtime error | VBE runtime error 54: Bad file mode (issue #123, Excel 16.0) |
|
|
110
|
+
| `file-number-zero` | File number 0 | error | runtime error | VBE runtime error 52: Bad file name or number (issue #123, Excel 16.0) |
|
|
111
|
+
| `file-record-zero` | Record number 0 | error | runtime error | VBE runtime error 63: Bad record number (issue #123, Excel 16.0) |
|
|
112
|
+
| `file-used-after-close` | File statement on a closed file number | error | runtime error | VBE runtime error 52: Bad file name or number (issue #123, Excel 16.0) |
|
|
99
113
|
| `fixed-array-redim` | Fixed-size array cannot be ReDimmed | error | compile error | MS-VBAL ReDim statement |
|
|
114
|
+
| `for-counter-overflow` | For counter overflows after its last pass | error | runtime error | MS-VBAL 5.4.2.3; VBE runtime error 6: Overflow (issue #116, Excel 16.0) |
|
|
100
115
|
| `for-each-control-variable-type` | For Each control variable must be Variant or Object | error | compile error | MS-VBAL 5.4.2.5 |
|
|
101
116
|
| `for-each-source-type` | For Each source must be collection or array | error | compile error | MS-VBAL 5.4.2.5 / VBE compiler: For Each may only iterate over a collection object or an array |
|
|
117
|
+
| `handler-fall-through` | Execution falls into an error handler that re-raises | error | runtime error | VBE runtime error 5 from Err.Raise Err.Number with Err.Number 0 (issue #117, Excel 16.0) |
|
|
118
|
+
| `host-argument-out-of-range` | Host argument out of range | error | runtime error | Office object model: 1-based collections, cell rows and columns from 1 (issue #122, Excel/Word/PowerPoint 16.0) |
|
|
119
|
+
| `implements-member-missing` | Interface member not implemented | error | compile error | MS-VBAL 5.2.4.1; VBE "Object module needs to implement ... for interface ..." (issue #125, Excel 16.0) |
|
|
120
|
+
| `implements-member-signature` | Interface member implemented with another signature | error | compile error | MS-VBAL 5.2.4.1; VBE "Procedure declaration does not match description of event or procedure having the same name" (issue #125, Excel 16.0) |
|
|
102
121
|
| `invalid-assignment-target` | Cannot assign to a literal value | error | compile error | MS-VBAL 5.4.3 (assignment) / VBE compiler |
|
|
103
122
|
| `is-operator-non-object` | 'Is' operator requires object operands | error | compile error | MS-VBAL 5.6 (Is operator) |
|
|
104
123
|
| `late-bound-friend-member` | Friend member reached through a late-bound receiver | error | runtime error | VBE runtime error 438: Object does not support this property or method |
|
|
@@ -108,24 +127,32 @@ Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or th
|
|
|
108
127
|
| `mid-statement-literal-target` | Mid statement target must be a writable String variable | error | compile error | MS-VBAL 5.4.3.4 (Mid/MidB statement) |
|
|
109
128
|
| `missing-library-reference` | Type library not referenced | error | compile error | VBE compiler: User-defined type not defined |
|
|
110
129
|
| `missing-return-assignment` | Function has no return assignment | warning | runtime risk | VBA Function return variable semantics |
|
|
130
|
+
| `multi-cell-range-as-scalar` | Multi-cell range read as a scalar | error | runtime error | VBE runtime error 13: Type mismatch on a Range value that is an array (issue #122, Excel 16.0) |
|
|
111
131
|
| `next-variable-mismatch` | Next variable does not match active For loop | error | compile error | MS-VBAL 5.4.2.5 |
|
|
112
132
|
| `non-callable-call` | Identifier is not callable | error | compile error | MS-VBAL 5.4.2.1 |
|
|
113
133
|
| `non-scalar-binary-operand` | Operator requires a scalar operand | error | compile error | MS-VBAL 5.6 (binary operators) / VBE compiler: array operand Type mismatch |
|
|
114
134
|
| `object-variable-not-set` | Object variable not set | error | runtime error | VBE runtime error 91: Object variable or With block variable not set |
|
|
115
135
|
| `raiseevent-undeclared-event` | RaiseEvent target is not declared | error | compile error | MS-VBAL RaiseEvent statement: event name resolution |
|
|
116
136
|
| `readonly-member-assignment` | Assignment to a read-only member | error | compile error | VBE compiler: Can't assign to read-only property |
|
|
137
|
+
| `recursive-property-accessor` | Property procedure calls itself | error | runtime error | VBE runtime error 28: Out of stack space (issue #117, Excel 16.0) |
|
|
117
138
|
| `redim-impossible-bounds` | ReDim lower bound is greater than upper bound | error | runtime error | MS-VBAL ReDim statement / VBE compiler runtime error 9 |
|
|
118
139
|
| `redim-preserve-dimension-change` | ReDim Preserve can only resize the last dimension | error | runtime error | MS-VBAL ReDim Preserve statement |
|
|
140
|
+
| `resume-without-error` | Resume with no error handler installed | error | runtime error | VBE runtime error 20: Resume without error (issue #117, Excel 16.0) |
|
|
141
|
+
| `return-without-gosub` | Execution falls into a GoSub target | error | runtime error | VBE runtime error 3: Return without GoSub (issue #117, Excel 16.0) |
|
|
119
142
|
| `runtime-argument-value` | Invalid runtime argument value | error | runtime error | MS-VBAL 5.6 / VBA runtime argument bounds and VBE compiler runtime error 5 |
|
|
120
143
|
| `runtime-conversion-value` | Invalid runtime conversion value | error | runtime error | MS-VBAL 5.6 / VBA runtime conversion and VBE compiler runtime error 13 |
|
|
144
|
+
| `runtime-member-not-found` | Member not found at run time | error | runtime error | VBE runtime error 438: Object doesn't support this property or method (issue #121, Excel 16.0) |
|
|
121
145
|
| `scalar-member-access` | Member access on scalar variable | error | compile error | VBE compiler: Invalid qualifier / Syntax error |
|
|
122
146
|
| `scalar-redim` | Scalar variable cannot be ReDimmed | error | compile error | MS-VBAL ReDim statement / VBE compiler: Expected array |
|
|
123
147
|
| `set-required` | Object assignment requires Set | error | runtime error | VBE runtime error 91: Object variable or With block variable not set (MS-VBAL 5.4.3 / Set statement) |
|
|
124
148
|
| `set-requires-object` | Set assignment requires an object variable | error | compile error | MS-VBAL 5.4.3 |
|
|
149
|
+
| `sheet-name-invalid` | Sheet name Excel refuses | error | runtime error | Excel runtime error 1004: invalid name for a sheet or chart (issue #122, Excel 16.0) |
|
|
125
150
|
| `string-arithmetic-coercion` | Nonnumeric string in numeric expression | error | runtime error | MS-VBAL 5.6 / runtime type coercion |
|
|
151
|
+
| `sub-used-as-value` | Sub used as a value | error | compile error | VBE "Expected Function or variable" (issue #125, Excel 16.0) |
|
|
126
152
|
| `typeof-is-always-false` | 'TypeOf ... Is' is always False | warning | runtime risk | MS-VBAL 5.6 (TypeOf...Is expression) |
|
|
127
153
|
| `unallocated-dynamic-array-access` | Dynamic array is not allocated | error | runtime error | VBE runtime error 9: Subscript out of range |
|
|
128
154
|
| `undefined-label` | Label not defined | error | compile error | MS-VBAL 5.4.1 / VBE compiler: Label not defined |
|
|
155
|
+
| `variant-value-misuse` | Variant value used as another kind | error | runtime error | VBE runtime errors 424 and 13 on a Variant holding a scalar or an array (issue #121, Excel 16.0) |
|
|
129
156
|
|
|
130
157
|
## Style (13)
|
|
131
158
|
|
|
@@ -145,23 +172,30 @@ Override a code's severity with `AnalyzeModuleOptions.severity_overrides` (or th
|
|
|
145
172
|
| `variable-never-read` | Variable is assigned but never read | information | style-policy | MS-VBAL 5.4.3 (assignment) plus dead-code policy |
|
|
146
173
|
| `vba-test-directive` | Invalid VBA test directive | warning | style-policy | VBA test directive comment syntax |
|
|
147
174
|
|
|
148
|
-
## Syntax (
|
|
175
|
+
## Syntax (24)
|
|
149
176
|
|
|
150
177
|
| Code | Title | Default | Kind | Spec reference |
|
|
151
178
|
| --- | --- | --- | --- | --- |
|
|
179
|
+
| `bracketed-variable-name` | Bracketed name in a variable declaration | error | compile error | MS-VBAL 3.3.5.3 foreign-name; VBE "Syntax error" on Dim [name] (issue #124, Excel 16.0) |
|
|
152
180
|
| `call-requires-parens` | Call statement requires parentheses around arguments | error | compile error | MS-VBAL 5.4.2.1 |
|
|
153
181
|
| `call-statement-forbids-parens` | Standalone zero-argument call cannot use empty parentheses | error | compile error | MS-VBAL 5.4.2.1 |
|
|
154
182
|
| `call-statement-multi-arg-parens` | Standalone call cannot parenthesize multiple arguments | error | compile error | MS-VBAL 5.4.2.1 |
|
|
183
|
+
| `date-literal-invalid` | Date literal the VBE refuses | error | compile error | MS-VBAL 3.3.3 date tokens; VBE "Syntax error" (issue #133, Excel 16.0) |
|
|
184
|
+
| `directive-trailing-statement` | Code after a compiler directive on its line | error | compile error | MS-VBAL 3.4 conditional compilation; VBE "An # ElseIf, # Else, or # EndIf must be preceded by an # If clause" (issue #130, Excel 16.0) |
|
|
155
185
|
| `else-branch-order` | Else branch must be final in conditional block | error | compile error | MS-VBAL 3.4 / 5.4.2.1 |
|
|
156
186
|
| `expression-call-requires-parens` | Function call in an expression requires parentheses around arguments | error | compile error | MS-VBAL 5.6.9 |
|
|
187
|
+
| `float-literal-overflow` | Floating-point literal overflows | error | compile error | MS-VBAL 3.3.2 FLOAT; VBE "Syntax error" on 1E400 (issue #125, Excel 16.0) |
|
|
157
188
|
| `if-missing-then` | If statement is missing Then | error | compile error | MS-VBAL 5.4.2.1 |
|
|
158
189
|
| `if-reserved-keyword-in-condition` | Reserved keyword in If condition | error | compile error | MS-VBAL 5.4.2.1 (If block) / 3.3.5.2 (reserved identifiers) / VBE compiler: Syntax error |
|
|
159
190
|
| `invalid-erase-target` | Erase target must be a variable or array name | error | compile error | MS-VBAL Erase statement |
|
|
160
191
|
| `invalid-explicit-call-target` | Invalid explicit Call target | error | compile error | VBE compiler: Syntax error |
|
|
161
192
|
| `invalid-expression-syntax` | Invalid expression syntax | error | compile error | MS-VBAL 5.6 / VBE compiler: Syntax error |
|
|
162
193
|
| `invalid-line-continuation` | Invalid line continuation | error | compile error | MS-VBAL 3.2.2 |
|
|
163
|
-
| `
|
|
194
|
+
| `line-too-long` | Physical line over 1023 characters | error | compile error | VBE line limit: 1023 characters compile, 1024 are refused (issue #133, Excel 16.0) |
|
|
195
|
+
| `open-missing-for` | 'Open' statement mode without 'For', or no 'As' clause | error | compile error | MS-VBAL 5.4.5.1 (Open statement) / VBE compiler |
|
|
196
|
+
| `rem-after-then` | Rem after Then | error | compile error | MS-VBAL 3.3.1 comment / 5.4.2.9 single-line If; VBE "Syntax error" (issue #125, Excel 16.0) |
|
|
164
197
|
| `statement-outside-procedure` | Statement outside procedure | error | compile error | MS-VBAL 5.2 / 5.4 |
|
|
198
|
+
| `stray-character` | Character VBA does not use | error | compile error | MS-VBAL 3.3.1 special-token; VBE "Syntax error" on ; ` { } @ ~ \| and a non-breaking space (issue #132, Excel 16.0) |
|
|
165
199
|
| `suffixed-literal-overflow` | Type-suffixed literal out of range | error | compile error | MS-VBAL 3.3.2 (number tokens / type suffixes) / VBE compiler |
|
|
166
200
|
| `typeof-missing-operand` | 'TypeOf' requires an object expression | error | compile error | MS-VBAL 5.6 (TypeOf...Is) / VBE compiler |
|
|
167
201
|
| `unbalanced-parens` | Unbalanced parentheses | error | compile error | MS-VBAL 3.3.1 |
|