Skip to content

[werft] Set more strict pre-commit rules #4850

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2021
Merged
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
10 changes: 8 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.0
rev: v4.0.1
hooks:
#- id: check-yaml
# args: [--allow-multiple-documents]
# - id: end-of-file-fixer
- id: trailing-whitespace
- id: check-symlinks
- id: mixed-line-ending
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: check-shebang-scripts-are-executable
- id: check-merge-conflict


# keep fork in sync!
- repo: https://github.com/gitpod-io/pre-commit-hooks
Expand All @@ -17,7 +22,8 @@ repos:
exclude: |
(?x)^(
.*example-layer.tar.gz|
.*\.(png|svg|ico|gpg)
.*\.(png|svg|ico|gpg)|
dev/version-manifest/version-manifest
)$
- id: script-must-have-extension
- id: shellcheck
Expand Down
2 changes: 1 addition & 1 deletion .werft/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export async function build(context, version) {
werft.phase('validate-changes', 'validating changes');

try {
exec(`pre-commit run --from-ref origin/HEAD --to-ref HEAD`);
exec(`pre-commit run --all-files --show-diff-on-failure`);
werft.result("validate changes", "github-check-changes", "conclusion success");
werft.done('validate-changes');
} catch (err) {
Expand Down
3 changes: 2 additions & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,10 @@ components:
socket: /run/containerd/containerd.sock
nodeRoots:
- /var/lib
- /run/containerd/io.containerd.runtime.v1.linux/k8s.io
- /run/containerd/io.containerd.runtime.v2.task/k8s.io
# On some hosts systems containerd uses different paths to store it's containers in, for example:
# Find out by ssh onto a node and "mount | grep rootfs" and have a look at the paths
# - /run/containerd/io.containerd.runtime.v1.linux/k8s.io
# - /run/containerd/io.containerd.runtime.v1.linux/moby
# - /run/containerd/io.containerd.runtime.v2.task/k8s.io
userNamespaces:
Expand Down
Empty file modified components/ide/code/bin/code
100644 → 100755
Empty file.
Empty file modified components/ide/code/bin/gitpod-code
100644 → 100755
Empty file.
Empty file modified components/ide/code/bin/open
100644 → 100755
Empty file.
Empty file modified components/ide/theia/bin/code
100644 → 100755
Empty file.
Empty file modified components/ide/theia/bin/open
100644 → 100755
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ if [ "$USER_ID" -ne 33333 ]; then
exit 1
fi

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

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

Expand Down
Empty file modified components/local-app-api/typescript-grpcweb/build.sh
100644 → 100755
Empty file.
Empty file.