Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support shell scripts with no extension, fix perl shebang regex #4076

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tnyeanderson
Copy link

@tnyeanderson tnyeanderson commented Oct 1, 2024

Proposed Changes

  1. Support sh/bash scripts which do not have an extension based on their shebang
  2. Fix the perl shebang regex to only include shebangs at the beginning of the file

Readiness Checklist

Author/Contributor

  • Add entry to the CHANGELOG listing the change and linking to the corresponding issue (if appropriate)
  • If documentation is needed for this change, has that been included in this pull request

Reviewing Maintainer

  • Label as breaking if this is a large fundamental change
  • Label as either automation, bug, documentation, enhancement, infrastructure, or performance

@tnyeanderson
Copy link
Author

Not sure if I added the CHANGELOG entry here since I'm unsure what the versioning scheme will be. Please correct me if I'm wrong.

@tnyeanderson tnyeanderson marked this pull request as ready for review October 1, 2024 22:39
CHANGELOG.md Outdated Show resolved Hide resolved
@@ -7,10 +7,17 @@ descriptor_flavors:
- c_cpp
- formatters
file_extensions:
- ""
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the impact of this in projects?

Copy link
Author

Choose a reason for hiding this comment

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

If the file without an extension does not include a matching shebang, my understanding is that there will be no impact

Copy link
Author

@tnyeanderson tnyeanderson Oct 1, 2024

Choose a reason for hiding this comment

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

However, this is needed in order for the conditional logic to even reach the point where it checks for matches in file_contains_regex. reference

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