Showing 72 of 72 total issues
Function tabs
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
cb.tabs = function() {
"use strict";
// Stores information relating to tabs
var tabs = {
list: [],
Method Client.Request
has a Cognitive Complexity of 40 (exceeds 20 allowed). Consider refactoring. Open
func (c Client) Request(method string, path string, body []byte) ([]byte, int, error) {
c.Host.Path = path
httpClient := &http.Client{}
req, err := http.NewRequest(method, c.Host.String(), bytes.NewBuffer(body))
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function tabs
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
cb.tabs = function() {
"use strict";
// Stores information relating to tabs
var tabs = {
list: [],
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function connection
has 74 lines of code (exceeds 25 allowed). Consider refactoring. Open
cb.connection = function() {
"use strict";
var networks = [
{
name: "freenode",
Method Client.Request
has 56 lines of code (exceeds 50 allowed). Consider refactoring. Open
func (c Client) Request(method string, path string, body []byte) ([]byte, int, error) {
c.Host.Path = path
httpClient := &http.Client{}
req, err := http.NewRequest(method, c.Host.String(), bytes.NewBuffer(body))
Function NewUser
has 5 return statements (exceeds 4 allowed). Open
func NewUser(email, password string) (*User, []validate.ValidationMsg, error) {
id, err := generateUUID()
if err != nil {
logger.Error.Print(err)
return &User{}, []validate.ValidationMsg{}, err
Method Client.Request
has 5 return statements (exceeds 4 allowed). Open
func (c Client) Request(method string, path string, body []byte) ([]byte, int, error) {
c.Host.Path = path
httpClient := &http.Client{}
req, err := http.NewRequest(method, c.Host.String(), bytes.NewBuffer(body))
Avoid too many return
statements within this function. Open
return;
Avoid too many return
statements within this function. Open
return;
Function util
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
cb.util = function() {
"use strict";
// Returns the index of an element amongst its siblings in its parent
var indexInParent = function(node) {
var children = node.parentNode.childNodes;
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
error strings should not be capitalized or end with punctuation or a newline Open
return -1, -1, fmt.Errorf("Invalid logLevel: %s\n", logLevel)
- Exclude checks
The property -moz-user-select is compatible with -webkit-user-select and should be included as well. Open
-webkit-user-select: none;
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.toolbar input {
- Exclude checks
Fallback color (hex or RGB) should precede RGBA color. Open
color: rgba(255, 255, 255, 0.87);
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.user-list {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.user-list .users li::after {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.channel .title {
- Exclude checks
Heading (h1) should not be qualified. Open
.channel .title h1 {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.window-buttons {
- Exclude checks
Rule doesn't have all its properties in alphabetical order. Open
.window-buttons a svg {
- Exclude checks