Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor shell scripts #141

Merged
merged 5 commits into from
Oct 19, 2023
Merged

Refactor shell scripts #141

merged 5 commits into from
Oct 19, 2023

Conversation

stefaniuk
Copy link
Contributor

@stefaniuk stefaniuk commented Oct 16, 2023

Description

This is the second part of the refactoring effort to ensure that the shell scripts:

  • Follow a consistent convention,
  • Pass the ShellCheck linting test (please run make shellscript-lint-all), and
  • Work either with the pre-installed CLI tooling or run commands using Docker containers.

Context

Information for a reviewer on how to test the scripts with the scan-secrets.sh as an example:

Install the CLI tool

# On macOS
brew install gitleaks
# On Ubuntu
apt install gitleaks

Run a test

./scripts/githooks/scan-secrets.sh
VERBOSE=1 ./scripts/githooks/scan-secrets.sh # Use the gitleaks CLI tool if installed
VERBOSE=1 FORCE_USE_DOCKER=1 ./scripts/githooks/scan-secrets.sh # Use Docker

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

Copy link
Contributor

@amaanibn-nasar1-nhs amaanibn-nasar1-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few questions

scripts/githooks/check-file-format.sh Show resolved Hide resolved
scripts/githooks/check-file-format.sh Outdated Show resolved Hide resolved
scripts/githooks/check-file-format.sh Show resolved Hide resolved
scripts/githooks/check-markdown-format.sh Show resolved Hide resolved
scripts/reports/cloc-repository.sh Outdated Show resolved Hide resolved
scripts/reports/generate-sbom.sh Show resolved Hide resolved
Copy link
Contributor

@jacobgill1 jacobgill1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@amaanibn-nasar1-nhs amaanibn-nasar1-nhs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@stefaniuk stefaniuk enabled auto-merge October 19, 2023 06:40
@stefaniuk stefaniuk added this pull request to the merge queue Oct 19, 2023
Merged via the queue into main with commit f0d46e7 Oct 19, 2023
22 checks passed
@stefaniuk stefaniuk deleted the Refactor_shell_scripts branch October 19, 2023 06:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants