Skip to content

Commit

Permalink
maint/polish ~ whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed Apr 19, 2020
1 parent db06c29 commit 3331b52
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ git-chglog
.LSOverride

# Icon must end with two \r
Icon
Icon

# Thumbnails
._*
Expand Down
148 changes: 74 additions & 74 deletions internal/chglog/chglog_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,88 +173,88 @@ func TestGeneratorNotFoundCommitsOne(t *testing.T) {
}

// func TestGeneratorWithTypeScopeSubject(t *testing.T) {
// assert := assert.New(t)
// testName := "type_scope_subject"
// assert := assert.New(t)
// testName := "type_scope_subject"

// setup(testName, func(commit commitFunc, tag tagFunc, _ gitcmd.Client) {
// commit("2018-01-01 00:00:00", "chore(*): First commit", "")
// commit("2018-01-01 00:01:00", "feat(core): Add foo bar", "")
// commit("2018-01-01 00:02:00", "docs(readme): Update usage #123", "")
// tag("1.0.0")
// setup(testName, func(commit commitFunc, tag tagFunc, _ gitcmd.Client) {
// commit("2018-01-01 00:00:00", "chore(*): First commit", "")
// commit("2018-01-01 00:01:00", "feat(core): Add foo bar", "")
// commit("2018-01-01 00:02:00", "docs(readme): Update usage #123", "")
// tag("1.0.0")

// commit("2018-01-02 00:00:00", "feat(parser): New some super options #333", "")
// commit("2018-01-02 00:01:00", "Merge pull request #999 from tsuyoshiwada/patch-1", "")
// commit("2018-01-02 00:02:00", "Merge pull request #1000 from tsuyoshiwada/patch-1", "")
// commit("2018-01-02 00:03:00", "Revert \"feat(core): Add foo bar @mention and issue #987\"", "")
// tag("1.1.0")
// commit("2018-01-02 00:00:00", "feat(parser): New some super options #333", "")
// commit("2018-01-02 00:01:00", "Merge pull request #999 from tsuyoshiwada/patch-1", "")
// commit("2018-01-02 00:02:00", "Merge pull request #1000 from tsuyoshiwada/patch-1", "")
// commit("2018-01-02 00:03:00", "Revert \"feat(core): Add foo bar @mention and issue #987\"", "")
// tag("1.1.0")

// commit("2018-01-03 00:00:00", "feat(context): Online breaking change", "BREAKING CHANGE: Online breaking change message.")
// commit("2018-01-03 00:01:00", "feat(router): Muliple breaking change", `This is body,
// commit("2018-01-03 00:00:00", "feat(context): Online breaking change", "BREAKING CHANGE: Online breaking change message.")
// commit("2018-01-03 00:01:00", "feat(router): Muliple breaking change", `This is body,

// BREAKING CHANGE:
// Multiple
// breaking
// change message.`)
// tag("2.0.0-beta.0")

// commit("2018-01-04 00:00:00", "refactor(context): gofmt", "")
// commit("2018-01-04 00:01:00", "fix(core): Fix commit\n\nThis is body message.", "")
// })

// gen := NewGenerator(&Config{
// Bin: "git",
// WorkingDir: filepath.Join(testRepoRoot, testName),
// Template: filepath.Join(cwd, "testdata", testName+".md"),
// Info: &Info{
// Title: "CHANGELOG Example",
// RepositoryURL: "/~https://github.com/git-chglog/git-chglog",
// },
// Options: &Options{
// CommitFilters: map[string][]string{
// "Type": []string{
// "feat",
// "fix",
// },
// },
// CommitSortBy: "Scope",
// CommitGroupBy: "Type",
// CommitGroupSortBy: "Title",
// CommitGroupTitleMaps: map[string]string{
// "feat": "Features",
// "fix": "Bug Fixes",
// },
// HeaderPattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$",
// HeaderPatternMaps: []string{
// "Type",
// "Scope",
// "Subject",
// },
// IssuePrefix: []string{
// "#",
// "gh-",
// },
// RefActions: []string{},
// MergePattern: "^Merge pull request #(\\d+) from (.*)$",
// MergePatternMaps: []string{
// "Ref",
// "Source",
// },
// RevertPattern: "^Revert \"([\\s\\S]*)\"$",
// RevertPatternMaps: []string{
// "Header",
// },
// NoteKeywords: []string{
// "BREAKING CHANGE",
// },
// },
// })

// buf := &bytes.Buffer{}
// err := gen.Generate(buf, "")
// output := strings.Replace(strings.TrimSpace(buf.String()), "\r\n", "\n", -1)

// assert.Nil(err)
// assert.Equal(`<a name="unreleased"></a>
// tag("2.0.0-beta.0")

// commit("2018-01-04 00:00:00", "refactor(context): gofmt", "")
// commit("2018-01-04 00:01:00", "fix(core): Fix commit\n\nThis is body message.", "")
// })

// gen := NewGenerator(&Config{
// Bin: "git",
// WorkingDir: filepath.Join(testRepoRoot, testName),
// Template: filepath.Join(cwd, "testdata", testName+".md"),
// Info: &Info{
// Title: "CHANGELOG Example",
// RepositoryURL: "/~https://github.com/git-chglog/git-chglog",
// },
// Options: &Options{
// CommitFilters: map[string][]string{
// "Type": []string{
// "feat",
// "fix",
// },
// },
// CommitSortBy: "Scope",
// CommitGroupBy: "Type",
// CommitGroupSortBy: "Title",
// CommitGroupTitleMaps: map[string]string{
// "feat": "Features",
// "fix": "Bug Fixes",
// },
// HeaderPattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$",
// HeaderPatternMaps: []string{
// "Type",
// "Scope",
// "Subject",
// },
// IssuePrefix: []string{
// "#",
// "gh-",
// },
// RefActions: []string{},
// MergePattern: "^Merge pull request #(\\d+) from (.*)$",
// MergePatternMaps: []string{
// "Ref",
// "Source",
// },
// RevertPattern: "^Revert \"([\\s\\S]*)\"$",
// RevertPatternMaps: []string{
// "Header",
// },
// NoteKeywords: []string{
// "BREAKING CHANGE",
// },
// },
// })

// buf := &bytes.Buffer{}
// err := gen.Generate(buf, "")
// output := strings.Replace(strings.TrimSpace(buf.String()), "\r\n", "\n", -1)

// assert.Nil(err)
// assert.Equal(`<a name="unreleased"></a>
// ## [Unreleased]

// ### Bug Fixes
Expand Down

0 comments on commit 3331b52

Please sign in to comment.