I noticed you're using a shell script wrapper to run the Python scripts. Since check-events.py is 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.
I noticed you're using a shell script wrapper to run the Python scripts. Since `check-events.py` is 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.
tobiichi3227
(Migrated from github.com)
reviewed 2025-02-18 02:45:36 +00:00
This can work.
However, it's not possible to check all three files at the same time.
```bash
bash -c '
python3 scripts/check-events.py fortune_generator/json/custom_special.json custom &&
python3 scripts/check-events.py fortune_generator/json/cyclical_special.json cyclical &&
python3 scripts/check-events.py fortune_generator/json/static_special.json static
'
```
This can work.
However, it's not possible to check all three files at the same time.
lifeadventurer
(Migrated from github.com)
reviewed 2025-02-18 07:16:37 +00:00
This can work. However, it's not possible to check all three files at the same time.
We have concluded that we should not use bash.
> ```shell
> bash -c '
> python3 scripts/check-events.py fortune_generator/json/custom_special.json custom &&
> python3 scripts/check-events.py fortune_generator/json/cyclical_special.json cyclical &&
> python3 scripts/check-events.py fortune_generator/json/static_special.json static
> '
> ```
>
> This can work. However, it's not possible to check all three files at the same time.
We have concluded that we should not use bash.
tobiichi3227
(Migrated from github.com)
reviewed 2025-02-18 07:18:41 +00:00
Set language: system instead of language: python because we're utilizing shell functionality rather than running a standalone Python script.
Yes.
I already setted
> Set `language: system` instead of `language: python` because we're utilizing shell functionality rather than running a standalone Python script.
Yes.
I already setted
tobiichi3227
(Migrated from github.com)
reviewed 2025-02-18 07:19:19 +00:00
This can work. However, it's not possible to check all three files at the same time.
We have concluded that we should not use bash.
Yes
> > ```shell
> > bash -c '
> > python3 scripts/check-events.py fortune_generator/json/custom_special.json custom &&
> > python3 scripts/check-events.py fortune_generator/json/cyclical_special.json cyclical &&
> > python3 scripts/check-events.py fortune_generator/json/static_special.json static
> > '
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > This can work. However, it's not possible to check all three files at the same time.
>
> We have concluded that we should not use bash.
Yes
lifeadventurer
(Migrated from github.com)
reviewed 2025-02-18 07:23:08 +00:00
Set language: system instead of language: python because we're utilizing shell functionality rather than running a standalone Python script.
Yes. I already setted
What is the problem of it not working?
> > Set `language: system` instead of `language: python` because we're utilizing shell functionality rather than running a standalone Python script.
>
> Yes. I already setted
What is the problem of it not working?
tobiichi3227
(Migrated from github.com)
reviewed 2025-02-18 07:56:21 +00:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
@@ -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.