rambler-oss/keyreader

View on GitHub

Showing 28 of 28 total issues

Function main has 64 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func main() {
    var (
        host Host
        user string
    )
Severity: Minor
Found in main.go - About 1 hr to fix

    Your code does not pass gofmt in 1 place. Go fmt your code!
    Open

    // +build ldap,!libc !cgo,!libc freebsd,!libc
    Severity: Minor
    Found in access_ldap.go by gofmt

    Ordered list item prefix
    Open

    2. if keyreader founds granted access, it looks for user with uid same as login and print their ssh pubkeys to stdout, otherwise it does 3-5 steps, but for PosixAccount instead of PosixGroup
    Severity: Info
    Found in README.md by markdownlint

    MD029 - Ordered list item prefix

    Tags: ol

    Aliases: ol-prefix

    Parameters: style ("one", "ordered"; default "one")

    This rule is triggered on ordered lists that do not either start with '1.' or do not have a prefix that increases in numerical order (depending on the configured style, which defaults to 'one').

    Example valid list if the style is configured as 'one':

    1. Do this.
    1. Do that.
    1. Done.

    Example valid list if the style is configured as 'ordered':

    1. Do this.
    2. Do that.
    3. Done.

    exported type Config should have comment or be unexported
    Open

    type Config interface {
    Severity: Minor
    Found in config.go by golint

    exported method ConfigV3.Check should have comment or be unexported
    Open

    func (c *ConfigV3) Check() error {
    Severity: Minor
    Found in config_v3.go by golint

    exported method ConfigV3.GetLdapServers should have comment or be unexported
    Open

    func (c *ConfigV3) GetLdapServers() []string {
    Severity: Minor
    Found in config_v3.go by golint

    Your code does not pass gofmt in 1 place. Go fmt your code!
    Open

    // +build libc,!ldap cgo,!freebsd,!ldap
    Severity: Minor
    Found in access_libc.go by gofmt

    Your code does not pass gofmt in 1 place. Go fmt your code!
    Open

    // +build freebsd
    Severity: Minor
    Found in config_freebsd.go by gofmt

    exported method ConfigBase.GetLdapGroups should have comment or be unexported
    Open

    func (c *ConfigBase) GetLdapGroups() string {
    Severity: Minor
    Found in config.go by golint

    Lists should be surrounded by blank lines
    Open

    * Netgroups are received via libnss (you can back it to ldap by libnss-ldap or sssd)
    Severity: Info
    Found in README.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

    func parameter noUsrAcl should be noUsrACL
    Open

    func usrFilter(user string, hosts []string, noUsrAcl bool) string {
    Severity: Minor
    Found in main.go by golint

    exported method ConfigV3.GetLdapIgnoreCert should have comment or be unexported
    Open

    func (c *ConfigV3) GetLdapIgnoreCert() bool {
    Severity: Minor
    Found in config_v3.go by golint

    exported method ConfigV3.FilterByFrom should have comment or be unexported
    Open

    func (c *ConfigV3) FilterByFrom() bool {
    Severity: Minor
    Found in config_v3.go by golint

    exported method ConfigBase.GetLdapBind should have comment or be unexported
    Open

    func (c *ConfigBase) GetLdapBind() string {
    Severity: Minor
    Found in config.go by golint

    exported method ConfigBase.GetLdapPass should have comment or be unexported
    Open

    func (c *ConfigBase) GetLdapPass() string {
    Severity: Minor
    Found in config.go by golint

    if block ends with a return statement, so drop this else and outdent its block
    Open

            } else {
    Severity: Minor
    Found in main.go by golint

    Lists should be surrounded by blank lines
    Open

    * Support NIS netgroups in accessTo attributes with sudo-compatible syntax, netgroups are distinguished by prepending 'plus' sign
    Severity: Info
    Found in README.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

    exported method ConfigBase.GetLdapNetGrs should have comment or be unexported
    Open

    func (c *ConfigBase) GetLdapNetGrs() string {
    Severity: Minor
    Found in config.go by golint

    Line length
    Open

    2. if keyreader founds granted access, it looks for user with uid same as login and print their ssh pubkeys to stdout, otherwise it does 3-5 steps, but for PosixAccount instead of PosixGroup
    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.

    Your code does not pass gofmt in 1 place. Go fmt your code!
    Open

    // +build !linux,!freebsd
    Severity: Minor
    Found in config_misc.go by gofmt
    Severity
    Category
    Status
    Source
    Language