You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+19-13Lines changed: 19 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,15 +55,16 @@ To make the contribution process as seamless as possible, we ask for the followi
55
55
#### Environment
56
56
57
57
- Fork the repository.
58
-
- Clone your forked repository locally.
59
-
- We use Go Modules to manage dependencies, so you can develop outside your `$GOPATH`.
60
-
- We use [golangci-lint](https://github.com/golangci/golangci-lint) to lint our code, you can install it locally via `make setup`.
58
+
- Clone your fork locally.
59
+
- Set up your development environment:
60
+
- We use Go Modules to manage dependencies, so you can develop outside your `$GOPATH`.
61
+
- Run `make setup` to install required dependencies and developer tools including [golangci-lint](https://github.com/golangci/golangci-lint), which we use to lint our code.
61
62
62
63
### Building and Testing
63
64
64
65
The following is a short list of commands that can be run in the root of the project directory
65
66
66
-
- Run `make` see a list of available targets.
67
+
- Run `make`to see a list of available targets.
67
68
- Run `make test` to run all unit tests.
68
69
- Run `make lint` to validate against our linting rules.
69
70
- Run `E2E_TAGS=e2e,atlas make e2e-test` will run end-to-end tests against an Atlas instance,
@@ -87,36 +88,41 @@ Please add the following line to your settings.json file :
87
88
"go.testTags": "unit,e2e"
88
89
```
89
90
90
-
This will enable compilation for unit test and end-to-end tests.
91
+
This will enable compilation for unit and end-to-end tests.
91
92
92
93
#### Debugging in VSCode
93
94
94
-
To debut in VSCode you need to create a debug configuration for the command with required arguments.
95
-
Run the following commands to
95
+
To debug in VSCode, you must create a debug configuration for the command with the required arguments.
96
+
Run the following commands to create a new launch.json file for the debugger:
96
97
97
98
```
98
99
touch .vscode/launch.json
99
100
```
100
-
Then put the following configuration into the file.
101
-
Review and replace command name and arguments depending on the command you are using.
101
+
Then put the following example configuration into the file.
102
+
Review and replace the command name and arguments depending on the command you want to debug.
102
103
103
104
```json
104
105
{
105
106
"configurations": [
106
107
{
107
-
"name": "Login Command",
108
+
"name": "DBuser Create Command",
108
109
"type": "go",
109
110
"request": "launch",
110
111
"mode": "auto",
111
112
"program": "${workspaceFolder}/cmd/atlas",
112
113
"env": {},
113
114
"args": [
114
-
"login"
115
+
"dbuser",
116
+
"create",
117
+
"atlasAdmin",
118
+
"--username",
119
+
"myUser",
120
+
"--password",
121
+
"123abc"
115
122
]
116
123
}
117
124
]
118
125
}
119
-
120
126
```
121
127
122
128
### Contributing New Command Group
@@ -145,7 +151,7 @@ For example please edit `./root/atlas/builder.go` to add your command builder me
145
151
### Adding a New Command
146
152
147
153
`atlas` has defined a basic structure for individual commands that should be followed.
148
-
For a`atlas scope newCommand` command, a file `internal/cli/scope/new_command.go` should implement:
154
+
For an`atlas scope newCommand` command, a file `internal/cli/scope/new_command.go` should implement:
149
155
150
156
- A `ScopeNewCommandOpts` struct which handles the different options for the command.
151
157
- At least a `func (opts *ScopeNewCommandOpts) Run() error` function with the main command logic.
0 commit comments