Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ options:

* weblate-component-too-long

- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.18/test_repo/syntax_err_module/__manifest__.py#L1 Repo Name + Odoo version + Module name is too long for weblate component 'big-big-big-big-big-big-big-big-big-big-big-big-big-big-big-big-big--00.0-syntax_err_module' size 91 is longer than 90 characters
- https://github.com/OCA/odoo-pre-commit-hooks/blob/v0.2.18/test_repo/syntax_err_module/__manifest__.py#L1 Repo Name + Odoo version + Module name is too long for weblate component 'biiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiig-00.0-syntax_err_module' size 101 is longer than 100 characters

* xml-create-user-wo-reset-password

Expand Down
2 changes: 1 addition & 1 deletion src/oca_pre_commit_hooks/checks_odoo_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
".csv",
".xml",
]
MAX_WEBLATE_NAME_LENGTH = 90
MAX_WEBLATE_NAME_LENGTH = 100
DATA_MANUAL_KEY = "oca_data_manual"
BLUE_PILL = "\033[94m🔵\033[0m"
RED_PILL = "\033[91m🔴\033[0m"
Expand Down
4 changes: 3 additions & 1 deletion tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import pytest

from oca_pre_commit_hooks import utils
from oca_pre_commit_hooks.checks_odoo_module import MAX_WEBLATE_NAME_LENGTH
from oca_pre_commit_hooks.global_parser import CONFIG_NAME, DISABLE_ENV_VAR, ENABLE_ENV_VAR

RND = random.Random(987654321)
Expand Down Expand Up @@ -41,7 +42,8 @@ def create_dummy_repo(src_path, dest_path):
copy_tree(src_path, dest_path)
subprocess.check_call(["git", "init", dest_path, "--initial-branch=main"])
subprocess.check_call(["git", "add", "*"], cwd=dest_path)
git_big_repo_name = "big-" * 17 + ".git"
git_big_repo_name = "b" + "i" * (MAX_WEBLATE_NAME_LENGTH - 24) + "g" + ".git"

subprocess.check_call(
["git", "remote", "add", "my_remote", f"git@github.com:/OCA/{git_big_repo_name}"], cwd=dest_path
)
Expand Down