Skip to content

Conversation

@Klintrup
Copy link
Owner

@Klintrup Klintrup commented Apr 6, 2025

This pull request includes several changes to the .github/workflows/megalinter.yml, README.md, and check_smartarray.sh files to improve the CI workflow and script consistency. The most important changes are grouped by theme below:

CI Workflow Enhancements:

  • Added a new GitHub Actions workflow configuration for MegaLinter to automate code linting and apply fixes based on the specified environment variables and events. This includes setting up the job, defining permissions, and configuring steps for checking out code, running MegaLinter, preparing commits, and pushing applied linter fixes.

Documentation Update:

  • Fixed a typographical error in the README.md file, changing "udate" to "update" in the description of the "unknown state" output. Also corrected the header from "Compability" to "Compatibility".

Script Consistency Improvements:

  • Updated check_smartarray.sh to streamline conditional statements by combining the if and then keywords on the same line for better readability and consistency. [1] [2]

@github-actions
Copy link

github-actions bot commented Apr 6, 2025

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Warnings Elapsed time
✅ BASH bash-exec 1 0 0 0.0s
✅ BASH shellcheck 1 0 0 0.07s
✅ BASH shfmt 1 0 0 0 0.02s
✅ COPYPASTE jscpd yes no no 1.01s
✅ MARKDOWN markdownlint 2 0 0 0 0.52s
✅ MARKDOWN markdown-link-check 3 0 0 2.85s
✅ MARKDOWN markdown-table-formatter 3 2 0 0 0.17s
✅ REPOSITORY checkov yes no no 9.26s
✅ REPOSITORY gitleaks yes no no 0.06s
✅ REPOSITORY git_diff yes no no 0.0s
✅ REPOSITORY grype yes no no 21.2s
✅ REPOSITORY syft yes no no 1.25s
✅ REPOSITORY trivy yes no no 3.92s
✅ REPOSITORY trivy-sbom yes no no 0.06s
✅ REPOSITORY trufflehog yes no no 2.69s

See detailed report in MegaLinter reports

MegaLinter is graciously provided by OX Security

@Klintrup Klintrup self-assigned this Apr 6, 2025
@Klintrup Klintrup requested a review from Copilot April 6, 2025 20:20
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • check_smartarray.sh: Language not supported

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Klintrup Klintrup requested a review from Copilot April 6, 2025 20:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • check_smartarray.sh: Language not supported
Comments suppressed due to low confidence (2)

README.md:32

  • Typo detected: 'udate' should be corrected to 'update'.
 | unknown state      | Volume is in an unknown state. Please submit a bug report so I can udate the script, include the following output. `camcontrol devlist`, `camcontrol inquiry da0 -D` - run the inquiry for every volume on the system.

.github/workflows/megalinter.yml:51

  • Using 'sudo' in this GitHub Actions step may not be necessary and could affect file permissions unexpectedly; consider verifying if elevated privileges are required in this context.
run: sudo chown -Rc $UID .git/

@sonarqubecloud
Copy link

sonarqubecloud bot commented Apr 6, 2025

@Klintrup Klintrup requested a review from Copilot April 6, 2025 20:33
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

Files not reviewed (1)
  • check_smartarray.sh: Language not supported
Comments suppressed due to low confidence (2)

.github/workflows/megalinter.yml:50

  • [nitpick] Consider refactoring this complex conditional expression (possibly by extracting parts into variables or adding inline comments) to improve readability and maintainability.
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')

.github/workflows/megalinter.yml:53

  • [nitpick] Consider simplifying or clarifying this conditional logic (e.g., by extracting a descriptive variable) to enhance clarity for future maintainers.
if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix')

@Klintrup Klintrup merged commit ca44a5d into main Apr 6, 2025
1 check was pending
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.

2 participants