Skip to content

Commit c5c51b9

Browse files
feature - Update the CONTRIBUTING guidelines
* Updated the contributing guidelines with Environment Setup, Contributing steps, How to build scorecard locally, What to do before submitting a pull request and Where the CI Tests are configured. Signed-off-by: naveen <172697+naveensrinivasan@users.noreply.github.com>
1 parent b216a1e commit c5c51b9

File tree

1 file changed

+32
-20
lines changed

1 file changed

+32
-20
lines changed

CONTRIBUTING.md

Lines changed: 32 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to Security Scorecards!
1+
# Contributing to Security Scorecards
22

33
Thank you for contributing your time and expertise to the Security Scorecards project.
44
This document describes the contribution guidelines for the project.
@@ -9,41 +9,53 @@ This document describes the contribution guidelines for the project.
99

1010
### Getting started
1111

12-
1. Create [a GitHub account](https://github.com/join)
13-
1. Create a [personal access token](https://docs.github.com/en/free-pro-team@latest/developers/apps/about-apps#personal-access-tokens)
14-
1. Set up your [development environment](#environment-setup)
12+
1. Create [a GitHub account](https://github.com/join)
13+
1. Create a [personal access token](https://docs.github.com/en/free-pro-team@latest/developers/apps/about-apps#personal-access-tokens)
14+
1. Set up your [development environment](#environment-setup)
1515

16-
Then you can [iterate](#iterating).
17-
1816
### Environment Setup
1917

2018
You must install these tools:
2119

22-
1. [`git`](https://help.github.com/articles/set-up-git/): For source control
20+
1. [`git`](https://help.github.com/articles/set-up-git/): For source control
2321

24-
1. [`go`](https://golang.org/doc/install): The language Tekton Pipelines is
25-
built in. You need go version [v1.15](https://golang.org/dl/) or higher.
22+
1. [`go`](https://golang.org/doc/install): You need go version [v1.15](https://golang.org/dl/) or higher.
2623

27-
## Iterating
24+
1. [`docker`](https://docs.docker.com/engine/install/): `v18.9` or higher.
2825

29-
You can build the project with:
26+
## Contributing steps
3027

31-
```shell
32-
go build .
33-
```
28+
1. Submit an issue describing your proposed change to the repo in question.
29+
1. The repo owners will respond to your issue promptly.
30+
1. Fork the desired repo, develop and test your code changes.
31+
1. Submit a pull request.
3432

35-
You can also use `go run` to iterate without a separate rebuild step:
33+
## How to build scorecard locally
3634

37-
```shell
38-
go run . --repo=<repo>
39-
```
35+
Note that, by building the scorecard from the source code we are allowed to test the changes made locally.
4036

41-
You can run tests with:
37+
1. Run the following command to clone your fork of the project locally
4238

4339
```shell
44-
go test .
40+
git clone git@github.com:<user>/scorecard.git $GOPATH/src/github.com/<user>/scorecard.git
4541
```
4642

43+
1. Ensure you activate module support before continue (`$ export GO111MODULE=on`)
44+
1. Run the command `make build` to build the source code
45+
46+
## What to do before submitting a pull request
47+
48+
Following the targets that can be used to test your changes locally.
49+
50+
| Command | Description | Is called in the CI? |
51+
| ---------- | --------------------------------------------------- | -------------------- |
52+
| make all | Runs go test,golangci lint checks, fmt, go mod tidy | yes |
53+
| make build | Runs go build | yes |
54+
55+
## Where the CI Tests are configured
56+
57+
1. See the [action files](.github/workflows) to check its tests, and the scripts used on it.
58+
4759
## Adding New Checks
4860

4961
Each check is currently just a function of type `CheckFn`.

0 commit comments

Comments
 (0)