Imports:
  - Types:
      - SomeEntity
      - SomeRoutine
    From: location_is_required/location_is_required_helper

Annotations: |
  Test LocationIsRequired rule.

  Good cases: GoodEntity, good_routine.
  Bad cases: BadEntity, bad_routine, MyEntity (empty location).
  Skip cases: embedded SomeEntity, SomeRoutine.

---

# Positive: entity with location
"GoodEntity()":
  location: entity.py
  annotations: |
    Entity with valid location
  properties: {}

# Positive: routine with location
"good_routine() -> result:str":
  location: tools.py
  annotations: |
    Routine with valid location

# Negative: entity without location
"BadEntity()":
  annotations: |
    Entity without location
  properties: {}

# Negative: routine without location
"bad_routine() -> result:str":
  annotations: |
    Routine without location

# Edge: entity with empty location
"MyEntity()":
  location: ""
  annotations: |
    Entity with empty location
  properties: {}

# Negative: location with directory path
"FormatEntity()":
  location: dir/file.py
  annotations: |
    Entity with path in location
  properties: {}

# Negative: location without extension
"NoExtEntity()":
  location: entityfile
  annotations: |
    Entity without file extension
  properties: {}

# Negative: location with trailing dot
"DotEntity()":
  location: "entity."
  annotations: |
    Entity with trailing dot in location
  properties: {}

# Negative: location with path and no extension
"PathNoExtEntity()":
  location: dir/file
  annotations: |
    Entity with path and no extension
  properties: {}

# Positive: dotfile location (valid)
"DotfileEntity()":
  location: .gitignore
  annotations: |
    Entity with dotfile location
  properties: {}

# Edge: embedded entity (skip)
->SomeEntity: {}

# Edge: embedded routine (skip)
"->SomeRoutine() -> result:str":
  annotations: |
    Embedded routine without location

---
Author: Test
CreatedAt: 11/04/26
Description: Test for LocationIsRequired rule
