All Projects → azohra → shell-linter

azohra / shell-linter

Licence: MIT license
A Github Action for ShellCheck

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to shell-linter

Njsscan
njsscan is a semantic aware SAST tool that can find insecure code patterns in your Node.js applications.
Stars: ✭ 128 (+120.69%)
Mutual labels:  lint, static-analysis
Protoc Gen Lint
A plug-in for Google's Protocol Buffers (protobufs) compiler to lint .proto files for style violations.
Stars: ✭ 221 (+281.03%)
Mutual labels:  lint, static-analysis
Nodejsscan
nodejsscan is a static security code scanner for Node.js applications.
Stars: ✭ 1,874 (+3131.03%)
Mutual labels:  lint, static-analysis
Rubocop Rspec
Code style checking for RSpec files
Stars: ✭ 603 (+939.66%)
Mutual labels:  lint, static-analysis
luli
A static analysis and linter tool for Lua
Stars: ✭ 45 (-22.41%)
Mutual labels:  lint, static-analysis
Cfn nag
Linting tool for CloudFormation templates
Stars: ✭ 808 (+1293.1%)
Mutual labels:  lint, static-analysis
Woke
✊ Detect non-inclusive language in your source code.
Stars: ✭ 190 (+227.59%)
Mutual labels:  lint, static-analysis
pahout
A pair programming partner for writing better PHP. Pahout means PHP mahout 🐘
Stars: ✭ 43 (-25.86%)
Mutual labels:  lint, static-analysis
lint-checks
A set of opinionated and useful lint checks
Stars: ✭ 61 (+5.17%)
Mutual labels:  lint, static-analysis
duplex
Duplicate code finder for Elixir
Stars: ✭ 20 (-65.52%)
Mutual labels:  lint, static-analysis
Exakat
The Exakat Engine : smart static analysis for PHP
Stars: ✭ 346 (+496.55%)
Mutual labels:  lint, static-analysis
ghaction-cmake
cmake swiss army knife github docker action
Stars: ✭ 19 (-67.24%)
Mutual labels:  lint, github-actions
Reviewdog
🐶 Automated code review tool integrated with any code analysis tools regardless of programming language
Stars: ✭ 4,541 (+7729.31%)
Mutual labels:  lint, static-analysis
Config Lint
Command line tool to validate configuration files
Stars: ✭ 118 (+103.45%)
Mutual labels:  lint, static-analysis
Detekt
Static code analysis for Kotlin
Stars: ✭ 4,169 (+7087.93%)
Mutual labels:  lint, static-analysis
Cflint
Static code analysis for CFML (a linter)
Stars: ✭ 156 (+168.97%)
Mutual labels:  lint, static-analysis
rubocop-linter-action
Rubocop Linter Action: A GitHub Action to run Rubocop against your code!
Stars: ✭ 86 (+48.28%)
Mutual labels:  lint, github-actions
chart-testing-action
A GitHub Action to lint and test Helm charts
Stars: ✭ 139 (+139.66%)
Mutual labels:  lint, github-actions
D Scanner
Swiss-army knife for D source code
Stars: ✭ 221 (+281.03%)
Mutual labels:  lint, static-analysis
lints
Lint all your JavaScript, CSS, HTML, Markdown and Dockerfiles with a single command
Stars: ✭ 14 (-75.86%)
Mutual labels:  lint, static-analysis

Shell Linter

Release Marketplace Actions Status

A GitHub Action that performs static analysis for shell scripts using ShellCheck.


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:

Run static analysis for all the supported shell scripts in your repository:

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v1
      - name: Run ShellCheck
        uses: azohra/shell-linter@latest

Run static analysis for a single shell script:

      - name: Run ShellCheck
        uses: azohra/shell-linter@latest
        with:
          path: "setup.sh"

Run static analysis for multiple shell scripts with or without extension:

      - name: Run ShellCheck
        uses: azohra/shell-linter@latest
        with:
          path: "setup,deploy.sh"

Run static analysis for all the shell scripts in a folder:

      - name: Run ShellCheck
        uses: azohra/shell-linter@latest
        with:
          path: "src"

Run static analysis using a wildcard path:

      - name: Run ShellCheck
        uses: azohra/shell-linter@latest
        with:
          path: "src/*.sh"

Exclude files and folders from the static analysis:

      - name: Run ShellCheck
        uses: azohra/shell-linter@latest
        with:
          exclude-paths: "src/setup.sh,tests/unit_tests" 

Note that exclude-paths only accepts paths relative to your project's root directory. However, do not include ./ at the beginning of the paths.

To exclude a folder and it's content recursively just provide the path of the folder without a / at the end. In the example above, the entire folder at the path tests/unit_tests will be excluded from linting.

Run static analysis for all the shell scripts and only report issue with error severity:

      - name: Run ShellCheck
        uses: azohra/shell-linter@latest
        with:
          path: "src/*.sh"
          severity: "error"

Run analysis by using a specific version of Shell Linter:

      - name: Run ShellCheck
        uses: azohra/[email protected]

Input

path

Optional. Execute lint check on a specific file or folder. Default: .

exclude-paths

Optional. Exclude files and folders from ShellCheck scan.

severity

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

License

This software is available as open source under the terms of the MIT License.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].