Skip to content

change syntax detectors

The Docker Suite Extension interfered with the YAML Extension. When both are installed, all YAML files are always detected as Compose files.

I formatted the entire file since it had tabs instead of whitespaces. But the relevant part is this:

    <detectors>
        <filename priority="1.0">compose.yml,docker-compose.yml</filename>
        <combo priority="0.7">
            <extension>yml</extension>
            <match-content>
                version\:|services\:|image\:|build\:|container_name\:|volumes\:|ports\:|environment\:|networks\:|depends_on\:|restart\:|healthcheck\:|logging\:|command\:
          </match-content>
        </combo>
        <match-content lines="20" priority="0.1">
          version\:|services\:|image\:|build\:|container_name\:|volumes\:|ports\:|environment\:|networks\:|depends_on\:|restart\:|healthcheck\:|logging\:|command\:
        </match-content>
    </detectors>

I tested this with some YAML and Compose files and Nova detects the correct syntax quite reliably.

Edited by Toni Förster

Merge request reports

Loading