-
Notifications
You must be signed in to change notification settings - Fork 44
Fixes trimming for windows. \r\n are not trimmed when using TrimSuffix #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bmeyers22
wants to merge
5
commits into
tcnksm:master
Choose a base branch
from
Workiva:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
da82c9b
Fixes trimming for windows. \r\n are not trimmed when using TrimSuffix
bmeyers22 da25fc4
Updated tests to reflect new code
bmeyers22 9fc3518
STUD-785 Added WK CI
joecotton-wk 2239ada
STUD-785 Added tool dependency to unit tests
joecotton-wk 7eec9f1
Merge pull request #2 from Workiva/release-v0.0.1
rmconsole3-wf File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,20 @@ | ||
| ## Purpose | ||
|
|
||
| Brief description of the purpose of this change. | ||
|
|
||
| ## Solution | ||
|
|
||
| High level overview of what was done. This is the roadmap for those who are going to CR. | ||
|
|
||
| ## Semantic Versioning (check one) | ||
|
|
||
| - [ ] The following were changed in a non-backward compatible way and requires a major version bump: | ||
| - _[link to the breaking change in the diff]_ | ||
| - [ ] Something public was added or changed in backward compatible way, this requires a minor version bump | ||
| - [ ] No public changes nor new features (backwards-compatible refactor or bug fix), so this can be included in a patch | ||
| release | ||
|
|
||
| ## How to QA | ||
|
|
||
| - [ ] run the following related examples: **(fill in)** | ||
| - [ ] Other necessary steps needed to fully exercise the solution should be added here. **(fill in)** |
This file contains hidden or 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,11 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "gomod" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "weekly" | ||
| day: sunday | ||
| commit-message: | ||
| prefix: fix | ||
| prefix-development: chore | ||
| include: scope |
This file contains hidden or 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 |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| *.test | ||
| test-reports/ |
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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,3 @@ | ||
| # This is a Golang library; it doesn't produce | ||
| # any artifacts. | ||
| FROM scratch |
This file contains hidden or 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 |
|---|---|---|
| @@ -1,26 +1,11 @@ | ||
| PACKAGES = $(shell go list ./... | grep -v '/vendor/') | ||
| SHELL := /bin/bash | ||
|
|
||
| default: test | ||
| test: tools | ||
| rm -rf test-reports | ||
| mkdir test-reports | ||
| go clean -testcache | ||
| GO111MODULE="off" go test -v 2>&1 ./... | go-junit-report -iocopy -set-exit-code -out test-reports/unit-test-report.xml | ||
|
|
||
| test-all: vet lint test test-race | ||
|
|
||
| test: | ||
| go test -v -parallel=4 ${PACKAGES} | ||
|
|
||
| test-race: | ||
| go test -v -race ${PACKAGES} | ||
|
|
||
| vet: | ||
| go vet ${PACKAGES} | ||
|
|
||
| lint: | ||
| @go get github.com/golang/lint/golint | ||
| go list ./... | grep -v vendor | xargs -n1 golint | ||
|
|
||
| cover: | ||
| @go get golang.org/x/tools/cmd/cover | ||
| go test -coverprofile=cover.out | ||
| go tool cover -html cover.out | ||
| rm cover.out | ||
|
|
||
| .PHONY: test test-race vet lint cover | ||
| tools: | ||
| go install github.com/jstemmer/go-junit-report/[email protected] | ||
| GO111MODULE="off" go get golang.org/x/crypto/ssh/terminal |
This file contains hidden or 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 @@ | ||
| version: 1 |
This file contains hidden or 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 hidden or 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 hidden or 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,22 @@ | ||
| # Testing with Skynet - https://github.com/Workiva/skynet/tree/master/docs | ||
| name: unit-tests | ||
| image: golang:1.18-bullseye | ||
| description: run unit tests | ||
| size: small | ||
| timeout: 600 # 10 minutes | ||
| contact: support-onecloud | ||
|
|
||
| run: | ||
| on-pull-request: true | ||
| on-tag: true | ||
| when-branch-name-is: | ||
| - master | ||
|
|
||
| scripts: | ||
| - make test | ||
|
|
||
| artifacts: | ||
| - test-reports | ||
|
|
||
| test-reports: | ||
| - test-reports |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: I'm not sure of the reasoning for this line so I left it in, but I'm guessing you needed it to get rid of new lines no matter what since they probably weren't working for windows. Using Trim instead of TrimSuffix should solve this problem, so you may be able to remove this line