l0nax/changelog-go

View on GitHub

Showing 134 of 134 total issues

Function GenerateChangelog has 59 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func GenerateChangelog(r *Release) {
    // load all unreleased Files
    err := GetEntries(r)
    if err != nil {
        log.Fatal(err)
Severity: Minor
Found in pkg/changelog/generator.go - About 1 hr to fix

    Function findTopDir has 8 return statements (exceeds 4 allowed).
    Open

    func findTopDir(cwd string) (string, error) {
        var err error
        var fs os.FileInfo
        var c bool
        var prevPath string // prevPath contains the previous path to prevent an infinite loop
    Severity: Major
    Found in cmd/root.go - About 50 mins to fix

      Function GetCurrentBranchFromRepository has 6 return statements (exceeds 4 allowed).
      Open

      func GetCurrentBranchFromRepository(repository *git.Repository) (string, error) {
          branchRefs, err := repository.Branches()
          if err != nil {
              return "", err
          }
      Severity: Major
      Found in pkg/gut/branch.go - About 40 mins to fix

        package comment should be of the form "Package cmd ..."
        Open

        /*
        Severity: Minor
        Found in cmd/new.go by golint

        package comment should be of the form "Package cmd ..."
        Open

        /*
        Severity: Minor
        Found in cmd/release.go by golint

        exported method EntryTypes.SearchEntryType should have comment or be unexported
        Open

        func (e *EntryTypes) SearchEntryType(se *SEntryType) (*entry.ChangeEntry, error) {
        Severity: Minor
        Found in internal/entryTypes.go by golint

        comment on exported var GitPath should be of the form "GitPath ..."
        Open

            // Path to the top git Directory. This variable does NOT contain the path
        Severity: Minor
        Found in internal/global.go by golint

        package comment should be of the form "Package changelog ..."
        Open

        // changelog implements the parser and writer for changelog entries and the
        Severity: Minor
        Found in pkg/changelog/doc.go by golint

        exported method BasicEntry.GetTypeDescription should have comment or be unexported
        Open

        func (b *BasicEntry) GetTypeDescription() string     { return b.typeDesc }
        Severity: Minor
        Found in pkg/entry/entries/basicEntries.go by golint

        2: cannot find package "github.com/spf13/cobra" in any of:
        Open

            "github.com/spf13/cobra"
        Severity: Minor
        Found in cmd/ciget.go by govet

        Multiple consecutive blank lines
        Open

        
        
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD012 - Multiple consecutive blank lines

        Tags: whitespace, blank_lines

        Aliases: no-multiple-blanks

        This rule is triggered when there are multiple consecutive blank lines in the document:

        Some text here
        
        
        Some more text here

        To fix this, delete the offending lines:

        Some text here
        
        Some more text here

        Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

        Lists should be surrounded by blank lines
        Open

        - Disable automatic updates [#2](https://gitlab.com/l0nax/changelog-go/-/issues/2)
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD032 - Lists should be surrounded by blank lines

        Tags: bullet, ul, ol, blank_lines

        Aliases: blanks-around-lists

        This rule is triggered when lists (of any kind) are either not preceded or not followed by a blank line:

        Some text
        * Some
        * List
        
        1. Some
        2. List
        Some text

        To fix this, ensure that all lists have a blank line both before and after (except where the block is at the beginning or end of the document):

        Some text
        
        * Some
        * List
        
        1. Some
        2. List
        
        Some text

        Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse lists that don't have blank lines before and after them.

        Note: List items without hanging indents are a violation of this rule; list items with hanging indents are okay:

        * This is
        not okay
        
        * This is
          okay

        Lists should be surrounded by blank lines
        Open

        - Add 'version' sub-command
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD032 - Lists should be surrounded by blank lines

        Tags: bullet, ul, ol, blank_lines

        Aliases: blanks-around-lists

        This rule is triggered when lists (of any kind) are either not preceded or not followed by a blank line:

        Some text
        * Some
        * List
        
        1. Some
        2. List
        Some text

        To fix this, ensure that all lists have a blank line both before and after (except where the block is at the beginning or end of the document):

        Some text
        
        * Some
        * List
        
        1. Some
        2. List
        
        Some text

        Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse lists that don't have blank lines before and after them.

        Note: List items without hanging indents are a violation of this rule; list items with hanging indents are okay:

        * This is
        not okay
        
        * This is
          okay

        package comment should be of the form "Package cmd ..."
        Open

        /*
        Severity: Minor
        Found in cmd/init.go by golint

        exported method BasicEntry.GetTypeID should have comment or be unexported
        Open

        func (b *BasicEntry) GetTypeID() int                 { return b.typeID }
        Severity: Minor
        Found in pkg/entry/entries/basicEntries.go by golint

        Multiple consecutive blank lines
        Open

        
        
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD012 - Multiple consecutive blank lines

        Tags: whitespace, blank_lines

        Aliases: no-multiple-blanks

        This rule is triggered when there are multiple consecutive blank lines in the document:

        Some text here
        
        
        Some more text here

        To fix this, delete the offending lines:

        Some text here
        
        Some more text here

        Note: this rule will not be triggered if there are multiple consecutive blank lines inside code blocks.

        Headers should be surrounded by blank lines
        Open

        ### Added (1 change)
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD022 - Headers should be surrounded by blank lines

        Tags: headers, blank_lines

        Aliases: blanks-around-headers

        This rule is triggered when headers (any style) are either not preceded or not followed by a blank line:

        # Header 1
        Some text
        
        Some more text
        ## Header 2

        To fix this, ensure that all headers have a blank line both before and after (except where the header is at the beginning or end of the document):

        # Header 1
        
        Some text
        
        Some more text
        
        ## Header 2

        Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse headers that don't have a blank line before, and will parse them as regular text.

        Multiple headers with the same content
        Open

        ### Fixed (1 change)
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD024 - Multiple headers with the same content

        Tags: headers

        Aliases: no-duplicate-header

        Parameters: allowdifferentnesting (boolean; default false)

        This rule is triggered if there are multiple headers in the document that have the same text:

        # Some text
        
        ## Some text

        To fix this, ensure that the content of each header is different:

        # Some text
        
        ## Some more text

        Rationale: Some markdown parses generate anchors for headers based on the header name, and having headers with the same content can cause problems with this.

        If the parameter allow_different_nesting is set to true, header duplication under different nesting is allowed, like it usually happens in change logs:

        # Change log
        
        ## 2.0.0
        
        ### Bug fixes
        
        ### Features
        
        ## 1.0.0
        
        ### Bug fixes

        Multiple headers with the same content
        Open

        ### Added (1 change)
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD024 - Multiple headers with the same content

        Tags: headers

        Aliases: no-duplicate-header

        Parameters: allowdifferentnesting (boolean; default false)

        This rule is triggered if there are multiple headers in the document that have the same text:

        # Some text
        
        ## Some text

        To fix this, ensure that the content of each header is different:

        # Some text
        
        ## Some more text

        Rationale: Some markdown parses generate anchors for headers based on the header name, and having headers with the same content can cause problems with this.

        If the parameter allow_different_nesting is set to true, header duplication under different nesting is allowed, like it usually happens in change logs:

        # Change log
        
        ## 2.0.0
        
        ### Bug fixes
        
        ### Features
        
        ## 1.0.0
        
        ### Bug fixes

        Lists should be surrounded by blank lines
        Open

        - Fix bug where existing `ReleaseInfo` file of a release isn't processed by `changelog-go`
        Severity: Info
        Found in CHANGELOG.md by markdownlint

        MD032 - Lists should be surrounded by blank lines

        Tags: bullet, ul, ol, blank_lines

        Aliases: blanks-around-lists

        This rule is triggered when lists (of any kind) are either not preceded or not followed by a blank line:

        Some text
        * Some
        * List
        
        1. Some
        2. List
        Some text

        To fix this, ensure that all lists have a blank line both before and after (except where the block is at the beginning or end of the document):

        Some text
        
        * Some
        * List
        
        1. Some
        2. List
        
        Some text

        Rationale: Aside from aesthetic reasons, some parsers, including kramdown, will not parse lists that don't have blank lines before and after them.

        Note: List items without hanging indents are a violation of this rule; list items with hanging indents are okay:

        * This is
        not okay
        
        * This is
          okay
        Severity
        Category
        Status
        Source
        Language