diff --git a/README.md b/README.md index 820504be..b1152ffa 100644 --- a/README.md +++ b/README.md @@ -305,6 +305,7 @@ But if you wish to select or exclude specific linters, we give you full control | **PYTHON_MYPY_CONFIG_FILE** | `.mypy.ini` | Filename for [mypy configuration](https://mypy.readthedocs.io/en/stable/config_file.html) (ex: `.mypi.ini`, `setup.config`) | | **PYTHON_PYLINT_CONFIG_FILE** | `.python-lint` | Filename for [pylint configuration](https://pylint.pycqa.org/en/latest/user_guide/run.html?highlight=rcfile#command-line-options) (ex: `.python-lint`, `.pylintrc`) | | **RUBY_CONFIG_FILE** | `.ruby-lint.yml` | Filename for [rubocop configuration](https://docs.rubocop.org/rubocop/configuration.html) (ex: `.ruby-lint.yml`, `.rubocop.yml`) | +| **SUPPRESS_FILE_TYPE_WARN** | `false` | If set to `true`, will hide warning messages about files without their proper extensions. Default is `false` | | **SUPPRESS_POSSUM** | `false` | If set to `true`, will hide the ASCII possum at top of log output. Default is `false` | | **SNAKEMAKE_SNAKEFMT_CONFIG_FILE** | `.snakefmt.toml` | Filename for [Snakemake configuration](https://github.com/snakemake/snakefmt#configuration) (ex: `pyproject.toml`, `.snakefmt.toml`) | | **SSL_CERT_SECRET** | `none` | SSL cert to add to the **Super-Linter** trust store. This is needed for users on `self-hosted` runners or need to inject the cert for security standards (ex. ${{ secrets.SSL_CERT }}) | diff --git a/lib/functions/detectFiles.sh b/lib/functions/detectFiles.sh index 94b7cef7..7c97f173 100755 --- a/lib/functions/detectFiles.sh +++ b/lib/functions/detectFiles.sh @@ -273,11 +273,13 @@ function CheckFileType() { GET_FILE_TYPE_CMD="$(GetFileType "$FILE")" if [[ ${GET_FILE_TYPE_CMD} == *"Ruby script"* ]]; then - ####################### - # It is a Ruby script # - ####################### - warn "Found ruby script without extension:[.rb]" - info "Please update file with proper extensions." + if [ "${SUPPRESS_FILE_TYPE_WARN}" == "false" ]; then + ####################### + # It is a Ruby script # + ####################### + warn "Found ruby script without extension:[.rb]" + info "Please update file with proper extensions." + fi ################################ # Append the file to the array # ################################ diff --git a/lib/linter.sh b/lib/linter.sh index 5656ae04..97d92b77 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -154,6 +154,8 @@ RUBY_FILE_NAME="${RUBY_CONFIG_FILE:-.ruby-lint.yml}" # shellcheck disable=SC2034 # Variable is referenced indirectly SNAKEMAKE_SNAKEFMT_FILE_NAME="${SNAKEMAKE_SNAKEFMT_CONFIG_FILE:-.snakefmt.toml}" # shellcheck disable=SC2034 # Variable is referenced indirectly +SUPPRESS_FILE_TYPE_WARN="${SUPPRESS_FILE_TYPE_WARN:-false}" +# shellcheck disable=SC2034 # Variable is referenced indirectly SUPPRESS_POSSUM="${SUPPRESS_POSSUM:-false}" # shellcheck disable=SC2034 # Variable is referenced indirectly # SSL_CERT_SECRET="${SSL_CERT_SECRET}"