-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #99: Adding sh linting reusable workflow
- Loading branch information
Showing
2 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Reusable Workflow for SH Script Conformance | ||
|
||
## Overview | ||
|
||
This workflow ensures that Shell scripts adhere to AI Lab's coding standards. | ||
It's designed to automatically check the conformance of SH scripts to maintain | ||
consistency and quality in the codebase. | ||
|
||
## Usage | ||
|
||
- **Purpose:** Automatically validate SH scripts against AI Lab's standards. It | ||
triggers on workflow calls or push events, reviewing the scripts for | ||
compliance. | ||
- **Steps** | ||
- Checkout Code: Fetches the latest code from the repository to be checked. | ||
- Run ShellCheck: Executes ShellCheck, a tool for linting and static analysis | ||
of SH scripts, to ensure they meet the predefined standards. | ||
|
||
## SH Scripting Guidelines for Developers | ||
|
||
- It's recommended to integrate | ||
[ShellCheck](https://github.com/koalaman/shellcheck) in your local development | ||
environment to catch issues early. ShellCheck provides detailed feedback for | ||
improving your SH scripts, adhering to best practices and coding standards. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
name: Check SH scripts conformance to AI Lab standards | ||
|
||
on: | ||
workflow_call: | ||
push: | ||
|
||
jobs: | ||
sh-lint-check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Run ShellCheck | ||
uses: azohra/shell-linter@latest |