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
)
Your code does not pass gofmt in 1 place. Go fmt your code! Open
// +build ldap,!libc !cgo,!libc freebsd,!libc
- Exclude checks
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
- Read upRead up
- Exclude checks
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 {
- Exclude checks
exported method ConfigV3.Check should have comment or be unexported Open
func (c *ConfigV3) Check() error {
- Exclude checks
exported method ConfigV3.GetLdapServers should have comment or be unexported Open
func (c *ConfigV3) GetLdapServers() []string {
- Exclude checks
Your code does not pass gofmt in 1 place. Go fmt your code! Open
// +build libc,!ldap cgo,!freebsd,!ldap
- Exclude checks
Your code does not pass gofmt in 1 place. Go fmt your code! Open
// +build freebsd
- Exclude checks
exported method ConfigBase.GetLdapGroups should have comment or be unexported Open
func (c *ConfigBase) GetLdapGroups() string {
- Exclude checks
Lists should be surrounded by blank lines Open
* Netgroups are received via libnss (you can back it to ldap by libnss-ldap or sssd)
- Read upRead up
- Exclude checks
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 {
- Exclude checks
exported method ConfigV3.GetLdapIgnoreCert should have comment or be unexported Open
func (c *ConfigV3) GetLdapIgnoreCert() bool {
- Exclude checks
exported method ConfigV3.FilterByFrom should have comment or be unexported Open
func (c *ConfigV3) FilterByFrom() bool {
- Exclude checks
exported method ConfigBase.GetLdapBind should have comment or be unexported Open
func (c *ConfigBase) GetLdapBind() string {
- Exclude checks
exported method ConfigBase.GetLdapPass should have comment or be unexported Open
func (c *ConfigBase) GetLdapPass() string {
- Exclude checks
if block ends with a return statement, so drop this else and outdent its block Open
} else {
- Exclude checks
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
- Read upRead up
- Exclude checks
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 {
- Exclude checks
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
- Read upRead up
- Exclude checks
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
- Exclude checks