HEX
Server: Apache
System: Linux server2.voipitup.com.au 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: posscale (1027)
PHP: 8.2.30
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/__pycache__/yamllint.cpython-310.pyc
o

�N�gl�@szddlZddlZzddlZddlmZddlmZdZWney'dZYnwe�	e
�Zdd�Zdd	�Z
	dd
d�ZdS)
�N)�linter)�YamlLintConfigTFcCstS)zY
    report if yamllint could be imported safly. allowing for clean import detection
    )�HAS_YAMLLINT�rr�G/opt/saltstack/salt/lib/python3.10/site-packages/salt/utils/yamllint.py�has_yamllintsrcCstjS)zE
    report version of yamllint installed for version comparison
    )�yamllint�__version__rrrr�versionsr
cCsn|dur
t|d�}nd}t|�}tjj�|�}g}t�||�D]}|�|j|j	|j
|jd��q||d�}|S)z�
    lint yaml and return result.
    source (required)
        yaml as str
    yamlconf (optional)
        yamllint config file to use, if not set will default to a salty version of realaxed.
    N)�filea 
        extends: relaxed
        rules:
          line-length: { max: 256, level: warning }
          empty-lines: disable
          empty-values: {forbid-in-block-mappings: false, forbid-in-flow-mappings: true}
          trailing-spaces: disable
          key-ordering: disable
        )�line�column�levelZcomment)�source�problems)r�salt�utilsZstringutilsZto_strr�run�appendrr
r�message)rZyamlconfZconfZyaml_outrZproblem�outputrrr�lints 	��
r)N)�loggingZsalt.utils.stringutilsrrrZyamllint.configrr�ImportError�	getLogger�__name__�logrr
rrrrr�<module>s�
	�