[ci] pre-commit: add check-jsonschema, other hooks #7469

Merged
jameslamb opened 11:55pm on September 28, 2026 wanted to merge 14 Ξ” into microsoft/lightgbm main from
ci/more-precommit-hooks
Code line content in this commit was purged after it aged past our code retention window of two weeks for this repo. We have insufficient quota to grab the code content at this time, please try back later.

If you receive this message over several days, please consider adding more users to your account (whose quota we can use to grab commit content), or contact [email protected] with error #33NFNE
Diff Delta:
14
About 25 Diff Delta/hour
Classified as:  Feature Add

jameslamb's Description of Work

Contributes to #7470


  • adds check-jsonschema, to help identify mistakes in the dependabot.yml and .readthedocs.yaml files (these are sometimes hard to catch in the limited feedback from those services)

  • adds several other pre-commit/pre-commit-hooks hooks, including some enforcing stricter handling of executable markers on files

Fixes these:

R-package/DESCRIPTION: marked executable but has no (or invalid) shebang!

tests/cpp_tests/test_common.cpp: marked executable but has no (or invalid) shebang!
.ci/lint-r-code.R: marked executable but has no (or invalid) shebang!
R-package/configure.win: marked executable but has no (or invalid) shebang!

And these:

.ci/test-python-oldest.sh: has a shebang but is not marked executable!

.ci/check-python-dists.sh: has a shebang but is not marked executable!
docs/build-docs.sh: has a shebang but is not marked executable!
docs/conf.py: has a shebang but is not marked executable!

11 total changed files
(1 file ignored)
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Loading changes...
Congrats, you've cleared the final file
PR review complete, one step closer to shipping πŸš€