Showing 300 of 562 total issues
Consider simplifying this complex logical expression. Open
if (self.__isDragging) {
self.__decStopped = false;
// Compute move distance
var moveX = currentTouchLeft - self.__lastTouchLeft;
Consider simplifying this complex logical expression. Open
if (self.options.freeze || !self.__isDown ||
(!self.__isDown && e.defaultPrevented) ||
(e.target.tagName === 'TEXTAREA' && e.target.parentElement.querySelector(':focus')) ) {
return;
}
Function postLink
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function postLink(scope, element, attr, scrollCtrl, transclude) {
Function animate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
animate: function(element, from, to, className, options) {
Function animateAfter
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function animateAfter(animationEvent, element, className, afterAnimationComplete, styles) {
Function animateRun
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function animateRun(animationEvent, element, className, activeAnimationComplete, styles) {
Function setClass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
setClass: function(element, add, remove, animationCompleted, options) {
Function beforeSetClass
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
beforeSetClass: function(element, add, remove, animationCompleted, options) {
Function animate
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
function animate(animationEvent, element, className, animationComplete, options) {
Function setDimensions
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
setDimensions: function(clientWidth, clientHeight, contentWidth, contentHeight, continueScrolling) {
Function open
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
Popup.prototype.open = function (url, name, popupOptions, redirectUri, dontPoll) {
Function scrollTo
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
scrollTo: function(left, top, animate, zoom, wasResize) {
Function __publish
has 5 arguments (exceeds 4 allowed). Consider refactoring. Open
__publish: function(left, top, zoom, animate, wasResize) {
Function AuthUser
has 5 return statements (exceeds 4 allowed). Open
func AuthUser(db *mgo.Database, email, password string) (*User, *Error) {
uC := db.C("users")
user := &User{}
err := uC.Find(bson.M{"email": email}).One(user)
if err != nil {
Function google
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def google():
access_token_url = 'https://accounts.google.com/o/oauth2/token'
people_api_url = 'https://www.googleapis.com/plus/v1/people/me/openIdConnect'
payload = dict(client_id=request.json['clientId'],
- 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 github
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def github():
access_token_url = 'https://github.com/login/oauth/access_token'
users_api_url = 'https://api.github.com/user'
params = {
- 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 facebook
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def facebook():
access_token_url = 'https://graph.facebook.com/v2.3/oauth/access_token'
graph_api_url = 'https://graph.facebook.com/v2.3/me'
params = {
- 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 linkedin
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def linkedin():
access_token_url = 'https://www.linkedin.com/uas/oauth2/accessToken'
people_api_url = 'https://api.linkedin.com/v1/people/~:(id,first-name,last-name,email-address)'
payload = dict(client_id=request.json['clientId'],
- 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
Avoid too many return
statements within this function. Open
return true;
Avoid too many return
statements within this function. Open
return currentHistoryId ? currentHistoryId == 'root' : true;