Skip to content

Add shellcheck shell script files linter #493

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

Closed
wants to merge 40 commits into from

Conversation

MareStare
Copy link
Contributor

@MareStare MareStare commented Apr 6, 2025

Before you begin

  • I understand my contributions may be rejected for any reason
  • I understand my contributions are for the benefit of Derpibooru and/or the Philomena software
  • I understand my contributions are licensed under the GNU AGPLv3
  • I understand all of the above

See the tool repo for details. Yeah it's written in Haskell

@MareStare MareStare requested a review from liamwhite April 6, 2025 04:08

. "$(dirname "${BASH_SOURCE[0]}")/lib.sh"

TOOL_VERSION=${TOOL_VERSION:-1.31.1}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that we are now pinning the version of typos, when previously we were using the master version of typos on CI. I think pinning the tool version is actually better in general, especially in case of typos because typos can produce new lints between patch releases. So every time typos does a release it breaks Philomena's CI.

Instead, we should bump the version of typos explicitly.

@Meow
Copy link
Member

Meow commented Apr 6, 2025

I... think this is going a tad too far with all the linting, considering you're adding this huge thing and this whole additional step, for the sake of files which we almost never modify.

@MareStare
Copy link
Contributor Author

MareStare commented Apr 6, 2025

I can remove it from the precommit hook if its perf is concerning you, but I expect to extend the dev scripts over time. I don't think this linter costs anything. I specifically made it so that adding new linters is extremely easy in this PR by splitting the existing init.sh script into several files per each tool, otherwise the changes in this PR would be much smaller

@MareStare MareStare marked this pull request as draft April 6, 2025 21:05
@MareStare MareStare force-pushed the feat/add-shellcheck branch 2 times, most recently from 270d3bf to 643f756 Compare April 8, 2025 23:42
@MareStare MareStare force-pushed the feat/add-shellcheck branch from 9d94e09 to dcb474d Compare April 22, 2025 00:56
@MareStare
Copy link
Contributor Author

Superseded by #528

@MareStare MareStare closed this Apr 27, 2025
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