diff --git a/.github/ISSUE_TEMPLATE/BLANK.md b/.github/ISSUE_TEMPLATE/BLANK.md deleted file mode 100644 index 0cea7fe6..00000000 --- a/.github/ISSUE_TEMPLATE/BLANK.md +++ /dev/null @@ -1,6 +0,0 @@ - ---- -name: Blank issue -about: Freeform issue, can be used for any topic. ---- - diff --git a/.github/ISSUE_TEMPLATE/ENHANCEMENT-REQUEST.md b/.github/ISSUE_TEMPLATE/ENHANCEMENT-REQUEST.md deleted file mode 100644 index b80cd55f..00000000 --- a/.github/ISSUE_TEMPLATE/ENHANCEMENT-REQUEST.md +++ /dev/null @@ -1,31 +0,0 @@ - ---- -name: Enhancement Request -about: Used for requesting enhancements to the GitHub Super-Linter - ---- - - -**What is the current behavior, if applicable?** - - -**What is the desired behavior?** - - -**Your impression of priority / how important this request is** - -- [ ] Critical: Can't use the tool without it. -- [ ] Business Critical: Immediate opportunity to win business with this feature -- [ ] Important: Will significantly enhance the overall utility of the demo -- [ ] Nice to have: self-explanatory - -**Business case or other information justifying priority** - -**Agreed upon priority** -- [ ] Critical: Can't use the tool without it. -- [ ] Business Critical: Immediate opportunity to win business with this feature -- [ ] Important: Will significantly enhance the overall utility of the demo -- [ ] Nice to have: self-explanatory - -**Other information** (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. Stack Overflow, gitter, etc) - diff --git a/.github/ISSUE_TEMPLATE/ISSUE.md b/.github/ISSUE_TEMPLATE/ISSUE.md deleted file mode 100644 index ca82066b..00000000 --- a/.github/ISSUE_TEMPLATE/ISSUE.md +++ /dev/null @@ -1,22 +0,0 @@ - ---- -name: Issue Template -about: Used for creating issues about the GitHub Super-Linter - ---- - ---- -### Issue with GitHub Super-Linter - ---- -**Branch/Version:** Example: main - ---- -**How to Reproduce:** Example: tried to build it - ---- -**Expected Behavior:** Example: It should have worked - ---- -**Additional Details:** Example: only happens half past midnight - diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 6b99bf89..00000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,48 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: bug -assignees: '' ---- - -## Describe the bug - - - -## Expected behavior - - - -## Steps to Reproduce - - - - - - - - -1. Go to '...' -1. Click on '....' -1. Scroll down to '....' -1. See error - -## Logs - - - -## Additional context - - diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 00000000..d5744bdf --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,74 @@ +--- +name: Bug report +about: Create a bug report +title: '' +labels: + - bug +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this bug report! + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + - type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: false + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + validations: + required: false + - type: textarea + attributes: + label: Super-Linter version + description: | + Super-Linter version where you observed this issue + placeholder: | + vX.Y.Z + render: markdown + validations: + required: true + - type: textarea + id: logs + attributes: + label: Relevant log output + description: | + Please copy and paste any relevant log output. + This will be automatically formatted into code, so no need for backticks. + Enable debug logging, either on GitHub Actions, or when running locally. + render: shell + validations: + required: true + - type: textarea + attributes: + label: Steps To Reproduce + description: | + Steps to reproduce the issue. + To speed up the triaging of your request, reproduce the issue running + Super-Linter locally: https://github.com/super-linter/super-linter/blob/main/docs/run-linter-locally.md + placeholder: | + 1. In this environment... + 1. With this config... + 1. Run '...' + 1. See error... + validations: + required: true + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..5d7a27e7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,3 @@ +--- +blank_issues_enabled: false +... diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md deleted file mode 100644 index e2899976..00000000 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: Feature request -about: Suggest an idea for this project -title: '' -labels: enhancement -assignees: '' - ---- - -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] - -**Describe the solution you'd like** -A clear and concise description of what you want to happen. - -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. - -**Additional context** -Add any other context or screenshots about the feature request here. - -**Note** -If this is a request to add a new language, after submitting this issue check out [the wiki](https://github.com/super-linter/super-linter/wiki/Adding-new-language-support) for more info on how to accomplish that. diff --git a/.github/ISSUE_TEMPLATE/feature_request.yml b/.github/ISSUE_TEMPLATE/feature_request.yml new file mode 100644 index 00000000..37ef994b --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.yml @@ -0,0 +1,44 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: + - enhancement +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this feature request! + If this is a request to add a new language, after submitting this issue + check out [the wiki](https://github.com/super-linter/super-linter/wiki/Adding-new-language-support) + for more information on how to accomplish that. + - type: checkboxes + attributes: + label: Is there an existing issue for this? + description: Please search to see if an issue already exists for the bug you encountered. + options: + - label: I have searched the existing issues + required: true + - type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: false + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you want to happen. + validations: + required: false + - type: textarea + attributes: + label: Anything else? + description: | + Links? References? Anything that will give us more context about the issue you are encountering! + + Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in. + validations: + required: false + +--- diff --git a/.github/ISSUE_TEMPLATE/general-question.md b/.github/ISSUE_TEMPLATE/general-question.md deleted file mode 100644 index 33c31f4a..00000000 --- a/.github/ISSUE_TEMPLATE/general-question.md +++ /dev/null @@ -1,10 +0,0 @@ ---- -name: General question -about: Ask a question here -title: '' -labels: question -assignees: '' - ---- - - diff --git a/docs/run-linter-locally.md b/docs/run-linter-locally.md index 8217e001..5402ff98 100644 --- a/docs/run-linter-locally.md +++ b/docs/run-linter-locally.md @@ -1,13 +1,16 @@ # Run Super-Linter locally to test your branch of code -If you want to test locally against the **Super-Linter** to test your branch of code, you will need to complete the following: +If you want to test locally against the **Super-Linter** to test your branch of +code or to reproduce an issue, do the following: - Clone your testing source code to your local environment - Install Docker to your local environment -- Pull the container down +- Pull the container - Run the container locally + +If you're contributing to Super-Linter, you also need to do following: + - Run the test suite locally -- Troubleshoot ## Install Docker to your local machine @@ -17,27 +20,38 @@ You can follow the link below on how to install and configure **Docker** on your ## Download the latest Super-Linter Docker container -- Pull the latest **Docker** container down from **DockerHub** +- Pull the latest **Docker** container image from the registry - `docker pull ghcr.io/super-linter/super-linter:latest` Once the container has been downloaded to your local environment, you can then begin the process, or running the container against your codebase. ## Run the container Locally -- You can run the container locally with the following **Base** flags to run your code: - - `docker run -e RUN_LOCAL=true -e USE_FIND_ALGORITHM=true -v /path/to/local/codebase:/tmp/lint ghcr.io/super-linter/super-linter` - - To run against a single file you can use: `docker run -e RUN_LOCAL=true -e USE_FIND_ALGORITHM=true -v /path/to/local/codebase/file:/tmp/lint/file ghcr.io/super-linter/super-linter` - - **NOTE:** You need to pass the `RUN_LOCAL` flag to bypass some of the GitHub Actions checks, as well as the mapping of your local codebase to `/tmp/lint` so that the linter can pick up the code - - **NOTE:** If you want to override the `/tmp/lint` folder, you can set the `DEFAULT_WORKSPACE` environment variable to point to the folder you'd prefer to scan. - - **NOTE:** The flag:`RUN_LOCAL` will set: `VALIDATE_ALL_CODEBASE` to true. This means it will scan **all** the files in the directory you have mapped. If you want to only validate a subset of your codebase, map a folder with only the files you wish to have linted - - **NOTE:** Add the `--rm` docker flag to automatically remove the container after execution. +You can run the container locally with the following flags to run your code: -### Flags for running Locally +```bash +docker run \ + -e ACTIONS_RUNNER_DEBUG=true \ + -e RUN_LOCAL=true \ + -v /path/to/local/codebase:/tmp/lint \ + ghcr.io/super-linter/super-linter:latest +``` -You can add as many **Additional** flags as needed, documented in [README.md](../README.md#Environment-variables) +This example uses the `latest` container image version. If you're trying to reproduce +an issue, **refer to a specific version instead**. + +Notes: + +- To run against a single file you can use: `docker run -e RUN_LOCAL=true -e USE_FIND_ALGORITHM=true -v /path/to/local/codebase/file:/tmp/lint/file ghcr.io/super-linter/super-linter` +- You need to pass the `RUN_LOCAL` flag to bypass some of the GitHub Actions checks, as well as the mapping of your local codebase to `/tmp/lint`. +- If you want to override the `/tmp/lint` folder, you can set the `DEFAULT_WORKSPACE` environment variable to point to the folder you'd prefer to scan. +- The flag:`RUN_LOCAL` will set: `VALIDATE_ALL_CODEBASE` to true. This means it will scan **all** the files in the directory you have mapped. If you want to only validate a subset of your codebase, map a folder with only the files you wish to have linted. +- Add the `--rm` docker flag to automatically removes the container after execution. +- You can add as many flags as needed. Flags are documented in the [README](../README.md#Environment-variables). ## Sharing Environment variables between Local and CI -If you run both locally and on CI it's very helpful to only have to define your env variables once. This is one setup using Github's [STRTA](https://github.com/github/scripts-to-rule-them-all) style to do so. +If you run both locally and on CI it's very helpful to only have to define your env variables once. +This is one setup using Github's [STRTA](https://github.com/github/scripts-to-rule-them-all) style to do so. ### .github/super-linter.env @@ -58,7 +72,7 @@ This always runs the local docker based linting. docker run --rm \ -e RUN_LOCAL=true \ --env-file ".github/super-linter.env" \ - -v "$PWD":/tmp/lint ghcr.io/super-linter/super-linter:v5 + -v "$PWD":/tmp/lint ghcr.io/super-linter/super-linter:latest ``` ### scripts/test