BenWestgate / Bails

Bails is a Bitcoin solution protecting against surveillance, censorship, and confiscation. It installs Bitcoin Core to Tails encrypted Persistent Storage, creates and recovers Bitcoin Core wallets from Codex32 (BIP93) seed backups, and creates backup Bails USB sticks and shareable blank Bails USB sticks. Learn more in README.md.
MIT License
46 stars 9 forks source link

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

Closed epiccurious closed 5 months ago

epiccurious commented 8 months ago

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 commented 8 months ago

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 commented 8 months ago

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

BenWestgate commented 8 months ago

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 commented 8 months ago

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

github-actions[bot] commented 6 months ago

Stale issue message

BenWestgate commented 5 months ago

@epiccurious: Was the robot supposed to close your open issue? Explain if these are still an issue, it seems to run a shell and python linter when I make pull requests to master.