Skip to content

mapping values are not allowed here #409

Closed
@stsmrvestas

Description

@stsmrvestas

Checklist

Description

I'm new, so apologies if this is a user error, however I'm getting this error from a pattern, which looks almost identical to what you have in your docs afaict. It is complaining when attempting review from CLI:

.sourcery.yaml:41:27-41:28 (root) mapping values are not allowed here
in .sourcery.yaml", line 42, column 28:
        pattern: class ${klass}:
                               ^ (line: 42)

Code snippet that reproduces issue

<cut>
rules:
  - id: service-class-naming
    description: Service class naming convention
    pattern: class ${klass}:
    condition: not klass.matches_regex("^[A-Z][a-zA-Z0-9]*Service(\(.*|):$")
    explanation: 'Service classes must be postfixed with "Service" - if you have additional classes in the same file, please move them to a separate file'

Debug Information

IDE Version:
PyCharm 2023.3.1 (Professional Edition)

Sourcery Version:
sourcery, version 1.15.0

Operating system and Version:
OSX Sonoma 14.2.1 (23C71)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions