# Ported from alibaba/open-code-review (Apache-2.0):
#   internal/config/rules/rule_docs/properties.md
#   at commit 89ec55b14442c9f2601fb55b5f554fb6fabbe2c7.
# OCR tool names were replaced with this workflow's read-only
# exploration language. See the NOTICE.md and LICENSE files
# in rules/builtin/ for attribution and license details.
version: 1

rules:
  - id: format.properties
    match:
      paths:
        - "**/*.properties"
    checks:
      - id: obvious-typos-or-spelling-errors
        category: conventions
        guidance: |
          - Spelling errors in key names, especially the standard spelling of common configuration items
      - id: configuration-error-detection
        category: correctness
        guidance: |
          - Duplicate key definitions within the visible scope of the current file causing configuration override issues
          - Malformed key-value pairs (missing equals sign, extra whitespace, etc.)
          - Special characters not properly escaped (e.g., backslashes in paths, Unicode characters, etc.)
      - id: critical-security-issues
        category: correctness
        guidance: |
          - Sensitive information (passwords, API keys, database connection strings, etc.) stored in plaintext
