From d2bd4d83f05bbdb04e7c27c7e78419a1948010de Mon Sep 17 00:00:00 2001 From: anakinxc <103552181+anakinxc@users.noreply.github.com> Date: Mon, 7 Aug 2023 19:43:39 +0800 Subject: [PATCH] Add bazel and yaml linter (#109) --- .github/workflows/buildifier.yml | 11 +++++++++++ .github/workflows/yaml-lint.yml | 17 +++++++++++++++++ bazel/repositories.bzl | 2 +- 3 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/buildifier.yml create mode 100644 .github/workflows/yaml-lint.yml diff --git a/.github/workflows/buildifier.yml b/.github/workflows/buildifier.yml new file mode 100644 index 0000000..5eef48b --- /dev/null +++ b/.github/workflows/buildifier.yml @@ -0,0 +1,11 @@ +--- +name: Bazel files check +on: [push] +jobs: + formatting-check: + name: Run buildifier check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Run buildifier + uses: jbajic/buildifier@v1 diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml new file mode 100644 index 0000000..d8f326c --- /dev/null +++ b/.github/workflows/yaml-lint.yml @@ -0,0 +1,17 @@ +--- +name: Yaml Lint +on: [push] # yamllint disable-line rule:truthy +jobs: + lintAllTheThings: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: yaml-lint + uses: ibiqlik/action-yamllint@v3 + with: + config_data: | + rules: + line-length: + max: 300 + allow-non-breakable-words: true + allow-non-breakable-inline-mappings: true diff --git a/bazel/repositories.bzl b/bazel/repositories.bzl index 338d40d..c63af9d 100644 --- a/bazel/repositories.bzl +++ b/bazel/repositories.bzl @@ -20,7 +20,7 @@ SECRETFLOW_GIT = "https://github.com/secretflow" IC_COMMIT_ID = "dfa3281d641f33c85266b4e04e8c0214f9401cf7" -SIMPLEST_OT_COMMIT_ID = "f40a33a37e3ff8cd81655c35237c177e358dc5b1" +SIMPLEST_OT_COMMIT_ID = "f40a33a37e3ff8cd81655c35237c177e358dc5b1" def yacl_deps(): _rule_python()