Skip to content

Commit 269c960

Browse files
aledbfroboquat
authored andcommitted
[werft] Set more strict pre-commit rules
1 parent 7de657c commit 269c960

File tree

10 files changed

+11
-5
lines changed

10 files changed

+11
-5
lines changed

.pre-commit-config.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.0
3+
rev: v4.0.1
44
hooks:
55
#- id: check-yaml
66
# args: [--allow-multiple-documents]
77
# - id: end-of-file-fixer
88
- id: trailing-whitespace
99
- id: check-symlinks
1010
- id: mixed-line-ending
11+
- id: check-case-conflict
12+
- id: check-executables-have-shebangs
13+
- id: check-shebang-scripts-are-executable
14+
- id: check-merge-conflict
15+
1116

1217
# keep fork in sync!
1318
- repo: https://github.com/gitpod-io/pre-commit-hooks
@@ -17,7 +22,8 @@ repos:
1722
exclude: |
1823
(?x)^(
1924
.*example-layer.tar.gz|
20-
.*\.(png|svg|ico|gpg)
25+
.*\.(png|svg|ico|gpg)|
26+
dev/version-manifest/version-manifest
2127
)$
2228
- id: script-must-have-extension
2329
- id: shellcheck

.werft/build.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export async function build(context, version) {
5050
werft.phase('validate-changes', 'validating changes');
5151

5252
try {
53-
exec(`pre-commit run --from-ref origin/HEAD --to-ref HEAD`);
53+
exec(`pre-commit run --all-files --show-diff-on-failure`);
5454
werft.result("validate changes", "github-check-changes", "conclusion success");
5555
werft.done('validate-changes');
5656
} catch (err) {

components/ide/code/bin/code

100644100755
File mode changed.

components/ide/code/bin/gitpod-code

100644100755
File mode changed.

components/ide/code/bin/open

100644100755
File mode changed.

components/ide/theia/bin/code

100644100755
File mode changed.

components/ide/theia/bin/open

100644100755
File mode changed.

components/image-builder/workspace-image-layer/tests/positive/verify.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ if [ "$USER_ID" -ne 33333 ]; then
66
exit 1
77
fi
88

9-
if [ -z "$(which git)" ]; then
9+
if [ -z "$(command -v git)" ]; then
1010
echo "git not installed!"
1111
fi
1212

13-
if [ -z "$(which bash)" ]; then
13+
if [ -z "$(command -v bash)" ]; then
1414
echo "bash not installed!"
1515
fi
1616

components/local-app-api/typescript-grpcweb/build.sh

100644100755
File mode changed.

install/docker/examples/gitpod-gitlab/certs/create-letsencrypt-certs.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)