Skip to content

Commit

Permalink
feat: support shell scripts with no extension, fix perl shebang regex
Browse files Browse the repository at this point in the history
  • Loading branch information
tnyeanderson committed Oct 1, 2024
1 parent d5670fa commit fd6b906
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,10 @@ Note: Can be used with `oxsecurity/megalinter@beta` in your GitHub Action mega-l
- [cfn-lint](https://github.com/aws-cloudformation/cfn-lint) from 1.15.1 to **1.15.2** on 2024-09-30
<!-- linter-versions-end -->

## [v8.0.1] - 2024-08-19

- Support shell scripts with no extension and only support perl shebangs at the beginning of a file in <https://github.com/oxsecurity/megalinter/pull/4076>

## [v8.0.0] - 2024-08-19

- Reporters
Expand Down
1 change: 1 addition & 0 deletions docs/descriptors/bash_shellcheck.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ This linter is available in the following flavors
### How are identified applicable files

- File extensions: `.sh`, `.bash`, `.dash`, `.ksh`
- Shebangs: `#!/usr/bin/env bash`, `#!/bin/bash`, `#!/bin/sh`

<!-- markdownlint-disable -->
<!-- /* cSpell:disable */ -->
Expand Down
7 changes: 7 additions & 0 deletions megalinter/descriptors/bash.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,17 @@ descriptor_flavors:
- c_cpp
- formatters
file_extensions:
- ""
- ".sh"
- ".bash"
- ".dash"
- ".ksh"
file_contains_regex_extensions:
- ""
file_contains_regex:
- "^#!/usr/bin/env bash"
- "^#!/bin/bash"
- "^#!/bin/sh"
install:
apk:
- bash
Expand Down
4 changes: 2 additions & 2 deletions megalinter/descriptors/perl.megalinter-descriptor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ file_extensions:
file_contains_regex_extensions:
- ""
file_contains_regex:
- "#!/usr/bin/env perl"
- "#!/usr/bin/perl"
- "^#!/usr/bin/env perl"
- "^#!/usr/bin/perl"
install:
apk:
- perl
Expand Down

0 comments on commit fd6b906

Please sign in to comment.