Skip to content

Commit

Permalink
Merge pull request #46 from azohra/feature/updating-readme
Browse files Browse the repository at this point in the history
Updated the README (closes #44)
  • Loading branch information
Azbagheri authored Dec 21, 2021
2 parents 73a14fe + 897a8a7 commit 82f6fac
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A GitHub Action that performs static analysis for shell scripts using [ShellChec

# Usage

Shell Linter can perform static analysis in various ways. By default it scans all the Shellcheck-supported shell scripts (sh/bash/dash/ksh) in your project. However, you can use the `path` parameter to scan a specific file or folder or use the `exclude-paths` parameter to exclude files or folders from the scan. With Shell Linter, you can also specify the minimum severity of errors to consider using the `severity` parameter. Specific use cases along with examples are shown below:
Shell Linter can perform static analysis in various ways. By default it scans all the ShellCheck-supported shell scripts (sh/bash/dash/ksh) in your project. However, you can use the `path` parameter to scan a specific file or folder or use the `exclude-paths` parameter to exclude files or folders from the scan. With Shell Linter, you can also specify the minimum severity of errors to consider using the `severity` parameter. Specific use cases along with examples are shown below:

#### Run static analysis for all the supported shell scripts in your repository:
```yml
Expand All @@ -22,45 +22,45 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
- uses: actions/checkout@v1
- name: Run Shellcheck
uses: actions/checkout@v1
- name: Run ShellCheck
uses: azohra/shell-linter@latest
```
#### Run static analysis for a single shell script:
```yml
- name: Run Shellcheck
- name: Run ShellCheck
uses: azohra/shell-linter@latest
with:
path: "setup.sh"
```
#### Run static analysis for multiple shell scripts **with or without** extension:
```yml
- name: Run Shellcheck
- name: Run ShellCheck
uses: azohra/shell-linter@latest
with:
path: "setup,deploy.sh"
```
#### Run static analysis for all the shell scripts in a folder:
```yml
- name: Run Shellcheck
- name: Run ShellCheck
uses: azohra/shell-linter@latest
with:
path: "src"
```
#### Run static analysis using a **wildcard** path:
```yml
- name: Run Shellcheck
- name: Run ShellCheck
uses: azohra/shell-linter@latest
with:
path: "src/*.sh"
```
#### Exclude files and folders from the static analysis:
```yml
- name: Run Shellcheck
- name: Run ShellCheck
uses: azohra/shell-linter@latest
with:
exclude-paths: "src/setup.sh,tests/unit_tests"
Expand All @@ -71,16 +71,16 @@ To exclude a folder and it's content recursively just provide the path of the fo

#### Run static analysis for all the shell scripts and only report issue with error severity:
```yml
- name: Run Shellcheck
- name: Run ShellCheck
uses: azohra/shell-linter@latest
with:
path: "src/*.sh"
severity: "error"
```
#### Run analysis by using a specific version of Shell Linter:
```yml
- name: Run Shellcheck
uses: azohra/shell-linter@v0.5.0
- name: Run ShellCheck
uses: azohra/shell-linter@v0.6.0
```

# Input
Expand All @@ -89,7 +89,7 @@ To exclude a folder and it's content recursively just provide the path of the fo
Optional. Execute lint check on a specific file or folder. Default: `.`

### `exclude-paths`
Optional. Exclude files and folders from Shellcheck scan.
Optional. Exclude files and folders from ShellCheck scan.

### `severity`
Optional. Specify minimum severity of errors to consider [style, info, warning, error]. Default: `style`
Expand Down

0 comments on commit 82f6fac

Please sign in to comment.