File tree Expand file tree Collapse file tree 5 files changed +76
-2
lines changed Expand file tree Collapse file tree 5 files changed +76
-2
lines changed Original file line number Diff line number Diff line change
1
+ #
2
+ # Licensed to the Apache Software Foundation (ASF) under one or more
3
+ # contributor license agreements. See the NOTICE file distributed with
4
+ # this work for additional information regarding copyright ownership.
5
+ # The ASF licenses this file to You under the Apache License, Version 2.0
6
+ # (the "License"); you may not use this file except in compliance with
7
+ # the License. You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ root = true
19
+
20
+ [* ]
21
+ charset = utf-8
22
+ end_of_line = lf
23
+ indent_style = space
24
+ indent_size = 4
25
+ insert_final_newline = true
26
+ trim_trailing_whitespace = true
27
+
28
+ [Makefile ]
29
+ indent_style = tab
30
+
31
+ [* .go ]
32
+ indent_style = tab
33
+ block_comment_start = /*
34
+ block_comment = *
35
+ block_comment_end = */
36
+
37
+ [** /go.mod ]
38
+ indent_style = tab
Original file line number Diff line number Diff line change 7
7
branches : [ main ]
8
8
9
9
jobs :
10
- lua :
10
+ lint :
11
11
runs-on : " ubuntu-18.04"
12
12
13
13
steps :
21
21
22
22
- name : Script
23
23
run : |
24
- luacheck .
24
+ make lint
Original file line number Diff line number Diff line change @@ -10,3 +10,4 @@ wasmtime-c-api
10
10
t /servroot
11
11
node_modules /
12
12
t /testdata /rust /target
13
+ utils /reindex
Original file line number Diff line number Diff line change @@ -18,3 +18,16 @@ build.testdata:
18
18
build.all.testdata : build.go.testdata
19
19
@cd ./t/testdata/assemblyscript && npm install && npm run asbuild
20
20
@cd ./t/testdata/rust && cargo build --target=wasm32-wasi
21
+
22
+ .PHONY : utils
23
+ utils :
24
+ ifeq ("$(wildcard utils/reindex) ", "")
25
+ wget -P utils https://raw.githubusercontent.com/iresty/openresty-devel-utils/master/reindex
26
+ chmod a+x utils/reindex
27
+ endif
28
+
29
+
30
+ .PHONY : lint
31
+ lint : utils
32
+ luacheck .
33
+ ./utils/check-test-code-style.sh
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+
4
+ set -x -euo pipefail
5
+
6
+ find t -name ' *.t' -exec grep -E " \-\-\-\s+(SKIP|ONLY|LAST|FIRST)$" {} + > /tmp/error.log || true
7
+ if [ -s /tmp/error.log ]; then
8
+ echo " Forbidden directives to found. Bypass test cases without reason are not allowed."
9
+ cat /tmp/error.log
10
+ exit 1
11
+ fi
12
+
13
+ find t -name ' *.t' -exec ./utils/reindex {} + > \
14
+ /tmp/check.log 2>&1 || (cat /tmp/check.log && exit 1)
15
+
16
+ grep " done." /tmp/check.log > /tmp/error.log || true
17
+ if [ -s /tmp/error.log ]; then
18
+ echo " =====bad style====="
19
+ cat /tmp/error.log
20
+ echo " you need to run 'reindex' to fix them. Read CONTRIBUTING.md for more details."
21
+ exit 1
22
+ fi
You can’t perform that action at this time.
0 commit comments