Skip to content

Commit 4dcdb45

Browse files
authored
added lint enforcement (#783)
* added lint enforcement
1 parent 049c29c commit 4dcdb45

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

.buildkite/pipeline.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,15 @@ steps:
44
queue: "init"
55
docker: "*"
66
command: ".buildkite/scripts/fossa.sh"
7+
- label: "Lint Check"
8+
agents:
9+
queue: "init"
10+
docker: "*"
11+
command: ".buildkite/scripts/lint.sh"
12+
plugins:
13+
- docker-compose#v3.0.0:
14+
run: unit-test-test-service
15+
config: docker/buildkite/docker-compose.yaml
716
- label: ":java: Unit test with test services"
817
agents:
918
queue: "workers"

.buildkite/scripts/lint.sh

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
3+
set -ex
4+
5+
./gradlew goJF
6+
7+
if [ -n "$(git status --porcelain)" ]; then
8+
echo "There are changes after linting (used goJF) cmd: ./gradlew goJF"
9+
echo "Please rerun the command and commit the changes"
10+
git status --porcelain
11+
exit 1
12+
fi

0 commit comments

Comments
 (0)