Skip to content

Commit cd275f8

Browse files
authored
Merge pull request #161 from setlog/feature/editorconfig
2 parents 34d8d8a + 95ef56c commit cd275f8

24 files changed

+631
-479
lines changed

.editorconfig

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
# EditorConfig: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
# Default preferences
7+
[*]
8+
end_of_line = lf
9+
insert_final_newline = true
10+
11+
# IDEA specific
12+
curly_bracket_next_line = false
13+
wildcard_import_limit = 0
14+
15+
16+
# Generic XML
17+
# https://google.github.io/styleguide/xmlstyle.html
18+
[*.xml]
19+
indent_size = 2
20+
indent_style = space
21+
22+
# Maven
23+
# https://maven.apache.org/
24+
[pom.xml]
25+
indent_size = 4
26+
indent_style = space
27+
28+
# Groovy (gradle)
29+
# ?
30+
[*.{groovy, gradle}]
31+
indent_size = 4
32+
indent_style = space
33+
34+
# Bazel: https://bazel.build/
35+
# https://github.com/bazelbuild/buildtools/blob/master/BUILD.bazel
36+
[*.{bazel, bzl}]
37+
indent_size = 4
38+
indent_style = space
39+
40+
# CSS
41+
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
42+
# http://cssguidelin.es/#syntax-and-formatting
43+
[*.css]
44+
indent_size = 2
45+
indent_style = space
46+
trim_trailing_whitespace = true
47+
48+
# GNU make
49+
# https://www.gnu.org/software/make/manual/html_node/Recipe-Syntax.html
50+
[Makefile]
51+
indent_style = tab
52+
53+
# Go
54+
# https://golang.org/cmd/gofmt/
55+
[{go.mod, *.go}]
56+
indent_style = tab
57+
58+
# GraphQL
59+
# https://graphql.org/learn/
60+
# https://prettier.io
61+
[*.graphql]
62+
indent_size = 2
63+
indent_style = space
64+
65+
# HTML
66+
# https://google.github.io/styleguide/htmlcssguide.xml#General_Formatting_Rules
67+
[*.{htm, html}]
68+
indent_size = 2
69+
indent_style = space
70+
trim_trailing_whitespace = true
71+
72+
# Java
73+
# https://google.github.io/styleguide/javaguide.html#s4.2-block-indentation
74+
[*.java]
75+
indent_size = 2
76+
indent_style = space
77+
78+
# JavaScript, JSON, JSX, JavaScript Modules, TypeScript
79+
# https://github.com/feross/standard
80+
# https://prettier.io
81+
# https://github.com/angular/angular-cli/blob/master/.editorconfig
82+
[*.{cjs, js, json, jsx, mjs, ts, tsx}]
83+
indent_size = 2
84+
indent_style = space
85+
trim_trailing_whitespace = true
86+
quote_type = single
87+
88+
89+
# Kotlin (and gradle.kts)
90+
# https://android.github.io/kotlin-guides/style.html#indentation
91+
[*.{kt, kts}]
92+
indent_size = 4
93+
indent_style = space
94+
95+
# LESS
96+
# https://github.com/less/less-docs#less-standards
97+
[*.less]
98+
indent_size = 2
99+
indent_style = space
100+
101+
# PHP
102+
# http://www.php-fig.org/psr/psr-2/
103+
[*.php]
104+
indent_size = 4
105+
indent_style = space
106+
107+
# Python
108+
# https://www.python.org/dev/peps/pep-0008/#code-lay-out
109+
[*.py]
110+
indent_size = 4
111+
indent_style = space
112+
113+
# Ruby
114+
# http://www.caliban.org/ruby/rubyguide.shtml#indentation
115+
[*.rb]
116+
indent_size = 2
117+
indent_style = space
118+
119+
# Rust
120+
# https://github.com/rust-lang/rust/blob/master/src/doc/style/style/whitespace.md
121+
[*.rs]
122+
indent_size = 4
123+
indent_style = space
124+
insert_final_newline = false
125+
trim_trailing_whitespace = true
126+
127+
# SASS
128+
# https://sass-guidelin.es/#syntax--formatting
129+
[*.{sass, scss}]
130+
indent_size = 2
131+
indent_style = space
132+
133+
# Shell
134+
# https://google.github.io/styleguide/shell.xml#Indentation
135+
[*.{bash, sh, zsh}]
136+
indent_size = 2
137+
indent_style = space
138+
139+
# TOML
140+
# https://github.com/toml-lang/toml/tree/master/examples
141+
[*.toml]
142+
indent_size = 2
143+
indent_style = space
144+
145+
# YAML
146+
# http://yaml.org/spec/1.2/2009-07-21/spec.html#id2576668
147+
[*.{yaml, yml}]
148+
indent_size = 2
149+
indent_style = space

.github/renovate.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
{
2-
"extends": ["config:base"],
2+
"extends": [
3+
"config:base"
4+
],
35
"rebaseWhen": "behind-base-branch",
4-
"ignoreDeps": ["golang.org/x/net", "golang.org/x/sys"]
6+
"ignoreDeps": [
7+
"golang.org/x/net",
8+
"golang.org/x/sys"
9+
]
510
}

.github/workflows/push.yml

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -14,38 +14,38 @@ jobs:
1414
GO111MODULE: "on"
1515

1616
steps:
17-
- name: Install Go
18-
uses: actions/setup-go@v1
19-
with:
20-
go-version: ${{ matrix.go-version }}
21-
- name: Install libgtk-3-dev
22-
if: matrix.platform == 'ubuntu-18.04'
23-
run: |
24-
sudo apt-get update -y
25-
sudo apt-get install -y libgtk-3-dev
26-
- name: Install goversioninfo
27-
shell: bash
28-
run: |
29-
export GOPATH="${HOME}/go"
30-
mkdir -p ${GOPATH}/bin
31-
mkdir -p ${GOPATH}/pkg
32-
mkdir -p ${GOPATH}/src
33-
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
34-
- name: Checkout repository
35-
uses: actions/checkout@v1
36-
- name: Test and build
37-
shell: bash
38-
run: |
39-
export GOPATH="${HOME}/go"
40-
export PATH="${GOPATH}/bin:${PATH}"
41-
make test
42-
make copy-test-files
43-
make
44-
make tools
45-
- name: Build and push Docker image
46-
shell: bash
47-
run: |
48-
printf "%s" "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
49-
docker build -f docker/validator-service.Dockerfile -t ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/} .
50-
docker push ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/}
51-
docker logout
17+
- name: Install Go
18+
uses: actions/setup-go@v1
19+
with:
20+
go-version: ${{ matrix.go-version }}
21+
- name: Install libgtk-3-dev
22+
if: matrix.platform == 'ubuntu-18.04'
23+
run: |
24+
sudo apt-get update -y
25+
sudo apt-get install -y libgtk-3-dev
26+
- name: Install goversioninfo
27+
shell: bash
28+
run: |
29+
export GOPATH="${HOME}/go"
30+
mkdir -p ${GOPATH}/bin
31+
mkdir -p ${GOPATH}/pkg
32+
mkdir -p ${GOPATH}/src
33+
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
34+
- name: Checkout repository
35+
uses: actions/checkout@v1
36+
- name: Test and build
37+
shell: bash
38+
run: |
39+
export GOPATH="${HOME}/go"
40+
export PATH="${GOPATH}/bin:${PATH}"
41+
make test
42+
make copy-test-files
43+
make
44+
make tools
45+
- name: Build and push Docker image
46+
shell: bash
47+
run: |
48+
printf "%s" "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USER }} --password-stdin
49+
docker build -f docker/validator-service.Dockerfile -t ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/} .
50+
docker push ${{ secrets.DOCKER_USER }}/trivrost-validator:${GITHUB_REF##*/}
51+
docker logout

.github/workflows/test.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,31 +15,31 @@ jobs:
1515
GO111MODULE: "on"
1616

1717
steps:
18-
- name: Install Go
19-
uses: actions/setup-go@v1
20-
with:
21-
go-version: ${{ matrix.go-version }}
22-
- name: Install libgtk-3-dev
23-
if: matrix.platform == 'ubuntu-18.04'
24-
run: |
25-
sudo apt-get update -y
26-
sudo apt-get install -y libgtk-3-dev
27-
- name: Install goversioninfo
28-
shell: bash
29-
run: |
30-
export GOPATH="${HOME}/go"
31-
mkdir -p ${GOPATH}/bin
32-
mkdir -p ${GOPATH}/pkg
33-
mkdir -p ${GOPATH}/src
34-
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
35-
- name: Checkout repository
36-
uses: actions/checkout@v1
37-
- name: Test and build
38-
shell: bash
39-
run: |
40-
export GOPATH="${HOME}/go"
41-
export PATH="${GOPATH}/bin:${PATH}"
42-
make test
43-
make copy-test-files
44-
make
45-
make tools
18+
- name: Install Go
19+
uses: actions/setup-go@v1
20+
with:
21+
go-version: ${{ matrix.go-version }}
22+
- name: Install libgtk-3-dev
23+
if: matrix.platform == 'ubuntu-18.04'
24+
run: |
25+
sudo apt-get update -y
26+
sudo apt-get install -y libgtk-3-dev
27+
- name: Install goversioninfo
28+
shell: bash
29+
run: |
30+
export GOPATH="${HOME}/go"
31+
mkdir -p ${GOPATH}/bin
32+
mkdir -p ${GOPATH}/pkg
33+
mkdir -p ${GOPATH}/src
34+
go get github.com/josephspurrier/goversioninfo/cmd/goversioninfo@63e6d1acd3dd857ec6b8c54fbf52e10ce24a8786
35+
- name: Checkout repository
36+
uses: actions/checkout@v1
37+
- name: Test and build
38+
shell: bash
39+
run: |
40+
export GOPATH="${HOME}/go"
41+
export PATH="${GOPATH}/bin:${PATH}"
42+
make test
43+
make copy-test-files
44+
make
45+
make tools

CONTRIBUTING.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Contributing
2-
When contributing to this repository, please first discuss the change you wish to make via issue.
2+
When contributing to this repository, please first discuss the change you wish to make via an issue.
3+
4+
This project uses [EditorConfig](https://editorconfig.org) to set some style rules. If your IDE does not support it natively, please install [a plugin](https://editorconfig.org/#download).
35

46
## Learning
57
Developer documentation may be found under `docs/dev/`.
@@ -40,16 +42,16 @@ To create a release for the latest version:
4042
* Finish all pending changes to develop
4143
* Make sure CHANGES.md is complete and has the correct publication date and version number
4244
* Run these commands:
43-
```
44-
git checkout develop
45-
git pull
46-
# check with git log that the branch is in the state which you want to release
47-
git checkout master
48-
git pull
49-
git merge develop --ff-only
50-
git push
51-
# check if pipeline succeeds - should always be the case!
52-
```
45+
```
46+
git checkout develop
47+
git pull
48+
# check with git log that the branch is in the state which you want to release
49+
git checkout master
50+
git pull
51+
git merge develop --ff-only
52+
git push
53+
# check if pipeline succeeds - should always be the case!
54+
```
5355
Finally, make a release through [the release-overview of the project's GitHub page](https://github.com/setlog/trivrost/releases), creating a new tag against `master`. Tag should be `vX.Y.Z`, title should be `vX.Y.Z (YYYY-MM-DD)` and message should be the markdown-formatted list of fixes, features and changes from `CHANGES.md`.
5456
5557
Alternatively:

cmd/launcher/locking/signature_io.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import (
66
"io/ioutil"
77
"os"
88

9-
log "github.com/sirupsen/logrus"
109
"github.com/setlog/trivrost/pkg/system"
10+
log "github.com/sirupsen/logrus"
1111
)
1212

1313
func readProcessSignatureListFile(filePath string) (procSigs []system.ProcessSignature) {

0 commit comments

Comments
 (0)