Skip to content

Fixed skipping of files and folders in lint and format#84

Merged
olehermanse merged 2 commits into
cfengine:mainfrom
olehermanse:improve
Apr 22, 2026
Merged

Fixed skipping of files and folders in lint and format#84
olehermanse merged 2 commits into
cfengine:mainfrom
olehermanse:improve

Conversation

@olehermanse
Copy link
Copy Markdown
Member

@olehermanse olehermanse commented Apr 22, 2026

For both lint and format we want similar behavior:

  • Skip hidden files (files starting with .) - don't lint / format them.
  • Skip policy files with intentional errors (ending with .x.cf) - don't lint / format them.
  • Skip hidden folders (folders starting with .) - don't recurse into them.

In all cases, this should only affect the code where we recurse into folders and find files. If the user explicitly specifies a .x.cf file as an argument, we should not skip it. Same for hidden files and folders.

@olehermanse olehermanse changed the title improve Skipped .x.cf files by default in lint and format Apr 22, 2026
olehermanse and others added 2 commits April 22, 2026 16:38
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Ole Herman Schumacher Elgesem <ole@northern.tech>
@olehermanse olehermanse changed the title Skipped .x.cf files by default in lint and format Fixed skipping of files and folders in lint and format Apr 22, 2026
@olehermanse olehermanse marked this pull request as ready for review April 22, 2026 14:43
@olehermanse olehermanse merged commit 19f51e9 into cfengine:main Apr 22, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants