Skip to content

Commit 1839f77

Browse files
authored
lint(pre-commit): exclude task that caused issues with git worktrees (#15335)
1 parent 2eafb6c commit 1839f77

File tree

3 files changed

+88
-67
lines changed

3 files changed

+88
-67
lines changed

.github/scripts/generate_pre_commit.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ def _generate_lint_fix_hook(self, project: Project) -> dict:
193193
return {
194194
"id": f"{project.project_id}-lint-fix",
195195
"name": f"{project.path} Lint Fix",
196-
"entry": f"./gradlew {project.gradle_path}:lintFix",
196+
"entry": f"./gradlew {project.gradle_path}:lintFix -x generateGitPropertiesGlobal",
197197
"language": "system",
198198
"files": f"^{project.path}/.*\\.(py|toml)$",
199199
"pass_filenames": False,
@@ -204,7 +204,7 @@ def _generate_spotless_hook(self, project: Project) -> dict:
204204
return {
205205
"id": f"{project.project_id}-spotless",
206206
"name": f"{project.path} Spotless Apply",
207-
"entry": f"./gradlew {project.gradle_path}:spotlessApply",
207+
"entry": f"./gradlew {project.gradle_path}:spotlessApply -x generateGitPropertiesGlobal",
208208
"language": "system",
209209
"files": f"^{project.path}/.*\\.java$",
210210
"pass_filenames": False,
@@ -215,7 +215,7 @@ def _generate_prettier_hook(self, project: Project) -> dict:
215215
return {
216216
"id": f"{project.project_id}-{project.taskName}",
217217
"name": f"{project.taskName}",
218-
"entry": f"./gradlew {project.gradle_path}:{project.taskName}",
218+
"entry": f"./gradlew {project.gradle_path}:{project.taskName} -x generateGitPropertiesGlobal",
219219
"language": "system",
220220
"files": project.filePattern,
221221
"pass_filenames": False,

.github/scripts/pre-commit-override.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ repos:
33
hooks:
44
- id: smoke-test-cypress-lint-fix
55
name: smoke-test cypress Lint Fix
6-
entry: ./gradlew :smoke-test:cypressLintFix
6+
entry: ./gradlew :smoke-test:cypressLintFix -x generateGitPropertiesGlobal
77
language: system
88
files: ^smoke-test/tests/cypress/.*\.tsx$
99
pass_filenames: false
1010
- id: update-lineage-file
1111
name: update-lineage-file
12-
entry: ./gradlew :metadata-ingestion:lineageGen
12+
entry: ./gradlew :metadata-ingestion:lineageGen -x generateGitPropertiesGlobal
1313
language: system
1414
files: ^(metadata-ingestion-modules/.*|metadata-models/.*)$
1515
pass_filenames: false

0 commit comments

Comments
 (0)