1set/starlight

View on GitHub

Showing 95 of 95 total issues

Function dict_popitem has 5 return statements (exceeds 4 allowed).
Open

func dict_popitem(fnname string, g *GoMap, args starlark.Tuple, _ []starlark.Tuple) (starlark.Value, error) {
    if len(args) > 0 {
        return nil, fmt.Errorf("%s: wanted 0 args, got %d", fnname, len(args))
    }
    keys := g.v.MapKeys()
Severity: Major
Found in convert/map.go - About 35 mins to fix

    Function list_extend has 5 return statements (exceeds 4 allowed).
    Open

    func list_extend(fnname string, g *GoSlice, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
        if len(args) != 1 {
            return nil, fmt.Errorf("extend: got %d arguments, want 1", len(args))
        }
        if err := g.checkMutable("extend"); err != nil {
    Severity: Major
    Found in convert/slice.go - About 35 mins to fix

      Function list_insert has 5 return statements (exceeds 4 allowed).
      Open

      func list_insert(fnname string, g *GoSlice, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
          if len(args) != 2 {
              return nil, fmt.Errorf("extend: got %d arguments, want 2", len(args))
          }
          if err := g.checkMutable("insert into"); err != nil {
      Severity: Major
      Found in convert/slice.go - About 35 mins to fix

        don't use underscores in Go names; func dict_pop should be dictPop
        Open

        func dict_pop(fnname string, g *GoMap, args starlark.Tuple, _ []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/map.go by golint

        don't use underscores in Go names; func dict_popitem should be dictPopitem
        Open

        func dict_popitem(fnname string, g *GoMap, args starlark.Tuple, _ []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/map.go by golint

        exported method GoSlice.Len should have comment or be unexported
        Open

        func (g *GoSlice) Len() int {
        Severity: Minor
        Found in convert/slice.go by golint

        Line length
        Open

        // also the value of c's Name field will now be Phil when referenced from Go code as well.
        Severity: Info
        Found in README-old.md by markdownlint

        MD013 - Line length

        Tags: line_length

        Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)

        This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.

        This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.

        You also have the option to exclude this rule for code blocks and tables. To do this, set the code_blocks and/or tables parameters to false.

        Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.

        exported method GoMap.Clear should have comment or be unexported
        Open

        func (g *GoMap) Clear() error {
        Severity: Minor
        Found in convert/map.go by golint

        exported method GoMap.Items should have comment or be unexported
        Open

        func (g *GoMap) Items() []starlark.Tuple {
        Severity: Minor
        Found in convert/map.go by golint

        exported method GoMap.Keys should have comment or be unexported
        Open

        func (g *GoMap) Keys() []starlark.Value {
        Severity: Minor
        Found in convert/map.go by golint

        don't use underscores in Go names; func dict_setdefault should be dictSetdefault
        Open

        func dict_setdefault(fnname string, g *GoMap, args starlark.Tuple, _ []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/map.go by golint

        Line length
        Open

        The [`Eval`](https://pkg.go.dev/github.com/1set/starlight#Eval) function encapsulates the complexities of setting up and executing Starlark scripts, providing a streamlined interface for developers. This encapsulation allows for easy execution of Starlark scripts with full access to the script's global variables, enhancing script interoperability and flexibility. Additionally, Starlight supports the Starlark `load()` function, enabling scripts to load and execute other scripts seamlessly. This feature simplifies the integration of Starlark scripting into Go applications, reducing the need for repetitive boilerplate code and fostering a more efficient development process.
        Severity: Info
        Found in README.md by markdownlint

        MD013 - Line length

        Tags: line_length

        Aliases: line-length Parameters: linelength, codeblocks, tables (number; default 80, boolean; default true)

        This rule is triggered when there are lines that are longer than the configured line length (default: 80 characters). To fix this, split the line up into multiple lines.

        This rule has an exception where there is no whitespace beyond the configured line length. This allows you to still include items such as long URLs without being forced to break them in the middle.

        You also have the option to exclude this rule for code blocks and tables. To do this, set the code_blocks and/or tables parameters to false.

        Code blocks are included in this rule by default since it is often a requirement for document readability, and tentatively compatible with code rules. Still, some languages do not lend themselves to short lines.

        Bare URL used
        Open

        Starlight is a wrapper library for google's [starlark](https://github.com/google/starlark-go)
        Severity: Info
        Found in README-old.md by markdownlint

        MD034 - Bare URL used

        Tags: links, url

        Aliases: no-bare-urls

        This rule is triggered whenever a URL is given that isn't surrounded by angle brackets:

        For more information, see http://www.example.com/.

        To fix this, add angle brackets around the URL:

        For more information, see <http:></http:>.

        Rationale: Without angle brackets, the URL isn't converted into a link in many markdown parsers.

        Note: if you do want a bare URL without it being converted into a link, enclose it in a code block, otherwise in some markdown parsers it will be converted:

        `http://www.example.com`

        don't use underscores in Go names; func dict_clear should be dictClear
        Open

        func dict_clear(fnname string, g *GoMap, args starlark.Tuple, _ []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/map.go by golint

        don't use underscores in Go names; func dict_update should be dictUpdate
        Open

        func dict_update(fnname string, g *GoMap, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/map.go by golint

        don't use underscores in Go names; func dict_values should be dictValues
        Open

        func dict_values(fnname string, g *GoMap, args starlark.Tuple, _ []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/map.go by golint

        don't use underscores in Go names; func list_pop should be listPop
        Open

        func list_pop(fnname string, g *GoSlice, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/slice.go by golint

        Multiple consecutive blank lines
        Open

        
        
        Severity: Info
        Found in README-old.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.

        Inline HTML
        Open

        # <img src="https://user-images.githubusercontent.com/3185864/49534746-5b90de80-f890-11e8-9fd6-5417cf915c67.png"/> Starlight [![GoDoc](https://godoc.org/github.com/starlight-go/starlight?status.svg)](https://godoc.org/github.com/starlight-go/starlight) [![Build Status](https://travis-ci.org/starlight-go/starlight.svg?branch=master)](https://travis-ci.org/starlight-go/starlight)
        Severity: Info
        Found in README-old.md by markdownlint

        MD033 - Inline HTML

        Tags: html

        Aliases: no-inline-html

        This rule is triggered whenever raw HTML is used in a markdown document:

        Inline HTML header

        To fix this, use 'pure' markdown instead of including raw HTML:

        # Markdown header

        Rationale: Raw HTML is allowed in markdown, but this rule is included for those who want their documents to only include "pure" markdown, or for those who are rendering markdown documents in something other than HTML.

        don't use underscores in Go names; func list_extend should be listExtend
        Open

        func list_extend(fnname string, g *GoSlice, args starlark.Tuple, kwargs []starlark.Tuple) (starlark.Value, error) {
        Severity: Minor
        Found in convert/slice.go by golint
        Severity
        Category
        Status
        Source
        Language