Chore(Fortune): add pre-commit to check special events #55
Reference in New Issue
Block a user
Delete Branch "ci/event-check-pre-commit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationUse the latest version v5.0.0
I noticed you're using a shell script wrapper to run the Python scripts. Since
check-events.pyis a Python program, I'd recommend calling it directly rather than through a shell script wrapper.This approach would be more Windows-friendly, as shell scripts can be problematic on Windows environments. Making this change will ensure developers across all platforms can use the pre-commit hooks without issue.
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationI switched to using a Python script because passing parameters directly is difficult.
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationIsn't this working?
entry: python3 scripts/check-events.py fortune_generator/json/custom_special.json custom@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationOh.
It works.
But I think this way can check three files and list all errors.
Instead of checking after each modification.
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationWhat do you mean by "checking after each modification"?
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationModify, commit, and then pre-commit check.
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationWhy do you need to check after each modification?
@@ -0,0 +1,36 @@# See https://pre-commit.com for more information@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationIt doesn't work.
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationThis can work.
However, it's not possible to check all three files at the same time.
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationSet
language: systeminstead oflanguage: pythonbecause we're utilizing shell functionality rather than running a standalone Python script.@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationWe have concluded that we should not use bash.
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationYes.
I already setted
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationYes
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationWhat is the problem of it not working?
@@ -0,0 +1,36 @@# See https://pre-commit.com for more informationChanging to language: system allows it to work properly.