Skip to content

Feature: lint helper pre push script - #1273

Open
javierbrk wants to merge 2 commits into
libremesh:masterfrom
javierbrk:feature/lint-helper-script
Open

Feature: lint helper pre push script#1273
javierbrk wants to merge 2 commits into
libremesh:masterfrom
javierbrk:feature/lint-helper-script

Conversation

@javierbrk

Copy link
Copy Markdown
Member

I recently tried to update an old pull request but the CI rejected mi script because of linting errors. To make this easier for everyone, this PR adds documentation and points to a helper script to run the CI linting jobs locally before pushing.

I evaluated the possibility of just running the tools directly from the console, but running the actual CI job locally is much more accurate and guarantees we are testing against the same environment.

The CI workflow executes three specific scripts:

Lua Linting (tools/ci/lint/lua.sh): Uses luacheck to analyze Lua code for syntax errors, unused variables, and warnings.
Shell Linting (tools/ci/lint/sh.sh): Uses shellcheck to find bugs, edge cases, and bad practices in shell scripts.
Formatting (tools/ci/lint/format.sh): Enforces consistent code style using shfmt.

@a-gave a-gave left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems perfect! Thanks!

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