-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Added CONTRIBUTING.md * Added linter, config, and documentation * Added formatter documentation * Integrated linting and formatting to VS Code
- Loading branch information
1 parent
563b9c5
commit 27e773c
Showing
10 changed files
with
92 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
run: | ||
timeout: 5m | ||
skip-dirs: | ||
- dist | ||
- test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
// See https://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations. | ||
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp | ||
|
||
// List of extensions which should be recommended for users of this workspace. | ||
"recommendations": [ | ||
"golang.go" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"go.lintTool": "golangci-lint", | ||
"editor.formatOnSave": true, | ||
"editor.defaultFormatter": "golang.go" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# Contributing | ||
|
||
Pull requests are welcome. | ||
|
||
For major changes, please open an issue first to discuss what you would like to change. | ||
|
||
## Installation | ||
|
||
In order to build the application, you first need to [get Go CLI](https://go.dev/doc/install). | ||
|
||
The project was built using Go version `go1.19.1 windows/amd64`. If you are on a different version and experiencing any issues, please submit an issue regarding that. | ||
|
||
To build a binary or executable, run: | ||
|
||
``` | ||
git clone https://github.com/devils2ndself/SSGo.git | ||
cd SSGO | ||
go build ssgo.go | ||
``` | ||
Or `go install` to install globally. | ||
|
||
## Formatting | ||
|
||
Anytime you perform changes that you want to contribute, please make sure the code is formatted appropriately. | ||
|
||
> Use `gofmt -s -w .` in order to format all code according to Go standards. | ||
## Linting | ||
|
||
We use [GoLangCI-Lint](https://golangci-lint.run/) in order to lint SSGo. You can see installation guide [here](https://golangci-lint.run/usage/install/). | ||
|
||
Linting is a part of a successful PR, so please make sure your code passes it. | ||
|
||
> Use `golangci-lint run` in order to lint-check all code in the directory. | ||
## IDE Integrations | ||
|
||
### VS Code | ||
|
||
It is recommended to install `golang.go` extension. This extension allows for automatic linting and on-save formatting. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,4 +7,4 @@ const DefaultOutput string = "dist" | |
var AcceptedInputFileTypes = map[string]bool{ | ||
".txt": true, | ||
".md": true, | ||
} | ||
} |