Skip to content

added yamllint option#358

Draft
ogorczow wants to merge 6 commits intonetascode:mainfrom
ogorczow:adding-yamllint
Draft

added yamllint option#358
ogorczow wants to merge 6 commits intonetascode:mainfrom
ogorczow:adding-yamllint

Conversation

@ogorczow
Copy link

@ogorczow ogorczow commented Dec 8, 2025

added --yamllint_on parameter which checks following:

🔴 ERROR level rules:
anchors - duplicated anchors and undeclared aliases control
new-lines - forces type of new line characters (unix/dos) <--------- fix for issue

⚠️ WARNING level rules:
braces - controls use of flow mappings and spaces inside braces {}
brackets - controls use of flow sequences and spaces inside brackets []

@ogorczow ogorczow marked this pull request as draft December 8, 2025 11:22
@ogorczow ogorczow requested a review from juchowan December 9, 2025 15:49
# NAC-specific yamllint configuration - minimal validation with only new-lines and anchors
config = "{extends: relaxed, rules: {key-duplicates: disable, new-line-at-end-of-file: disable, hyphens: disable, indentation: disable, colons: disable, commas: disable, empty-lines: disable, line-length: disable, trailing-spaces: disable, new-lines: enable}}"

result = subprocess.run( # nosec B603 B607
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yamllint being Python based as well, there should ideally be a better entrypoint than "process".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants