Skip to content

Check additional YAML file paths for ratchet#43

Merged
sethvargo merged 1 commit intomainfrom
sethvargo/more
Jul 31, 2025
Merged

Check additional YAML file paths for ratchet#43
sethvargo merged 1 commit intomainfrom
sethvargo/more

Conversation

@sethvargo
Copy link
Contributor

No description provided.

@sethvargo sethvargo changed the title Sethvargo/more Check additional YAML file paths for ratchet Jul 31, 2025
Make ratchet find more files
@sethvargo sethvargo enabled auto-merge (squash) July 31, 2025 23:45
@sethvargo sethvargo requested a review from Copilot July 31, 2025 23:45
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enhances the YAML file discovery for the ratchet linting tool to check additional file paths beyond just GitHub workflows and actions. The main change expands ratchet to also scan for action.yaml and action.yml files in the repository root.

  • Expands ratchet file pattern to include root-level action files
  • Dynamically discovers and passes ratchet-eligible files to the linting step
  • Removes unused outputs for gomod-dirs and packagejson-dirs
Comments suppressed due to low confidence (2)

.github/workflows/lint.yml:71

  • The regex pattern is duplicated between match_files and find_files calls. Consider extracting this pattern into a variable to avoid duplication and ensure consistency.
          if match_files '(action\.(yaml|yml))|(\.github/(actions|workflows)/.*\.(yaml|yml))$'; then

.github/workflows/lint.yml:73

  • Using tr '\n' ' ' to convert newlines to spaces may cause issues if file paths contain spaces. Consider using a more robust approach like array handling or proper shell quoting.
            RATCHET_FILES="$(find_files '(action\.(yaml|yml))|(\.github/(actions|workflows)/.*\.(yaml|yml))$' | tr '\n' ' ')"

@sethvargo sethvargo merged commit 145cb9a into main Jul 31, 2025
6 checks passed
@sethvargo sethvargo deleted the sethvargo/more branch July 31, 2025 23:49
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.

3 participants