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

Add shell CI/CD linter and fix lint issues #95

Open
epiccurious opened this issue Mar 24, 2024 · 5 comments · May be fixed by #162
Open

Add shell CI/CD linter and fix lint issues #95

epiccurious opened this issue Mar 24, 2024 · 5 comments · May be fixed by #162
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers no-issue-activity priority: high issues raised or encountered by 2 or more testers
Milestone

Comments

@epiccurious
Copy link
Collaborator

Is your feature request related to a problem? Please describe.
Add automated linters for shell and python to the repo.

Describe the solution you'd like
Every time there's commit to master or any PR, run shell and Python linters.

Describe alternatives you've considered
The user and reviewer could run linters manually, but it's hard to enforce that behavior.

Additional context
We'll need to identify which linter checks to exclude, based on @BenWestgate's preference. For example, shellcheck enforces ${variable_name} instead of $variable_name which is nice but optional in many cases.

@BenWestgate
Copy link
Owner

Seems like a good solution that'll make higher quality PRs.

@epiccurious I don't care if it puts {} around variable names or not, you can decide. Check the code formatting both ways and see what is easier to read, if drawn use the shellcheck defaults. I obviously typed it without curly braces to save time because I know where they are not needed.

@epiccurious
Copy link
Collaborator Author

Ok. I'll exclude the nit rule for double-quoting variables. For reference, here's the documentation for it https://www.shellcheck.net/wiki/SC2086

@epiccurious epiccurious changed the title Add python and shell CI/CD linters Add shell CI/CD linter and fix lint issues Mar 25, 2024
@BenWestgate
Copy link
Owner

BenWestgate commented Mar 25, 2024

Ok. I'll exclude the nit rule for double-quoting variables. For reference, here's the documentation for it https://www.shellcheck.net/wiki/SC2086

I don't mind if it puts double quotes around variables either. Less custom rules is better, but less work complying with the rules is best.

When I worked on Tails, my IDE reformatted a lot of the python automatically and it was a pain to work on. Almost that same week after they saw my struggle they added a python code formater to their linter/ci/cd/xkwjuhaishdflp! thing.

@epiccurious
Copy link
Collaborator Author

Ok I'll remove this rule exception and reformat with double-quotes.

@BenWestgate BenWestgate added enhancement New feature or request good first issue Good for newcomers priority: high issues raised or encountered by 2 or more testers labels Mar 29, 2024
@BenWestgate BenWestgate added this to the L1 (BETA) milestone Mar 29, 2024
@BenWestgate BenWestgate linked a pull request May 26, 2024 that will close this issue
Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers no-issue-activity priority: high issues raised or encountered by 2 or more testers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants