Showing 5 of 128 total issues
File test_login.js
has 279 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/**
* Created by Michal on 2016-02-22.
* Contains unit tests for the authenticator
*/
import expect from 'expect';
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(){
return(
<div id="developer_resources_links">
<button className="btn btn-default" onClick={
() => {this.setState({open: !this.state.open})}
Function exports
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
browsers: [ 'PhantomJS' ],
Function logout_user
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function logout_user(){
return function(dispatch){
let state;
dispatch(logout_started());
Function login_button_clicked
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
Open
export const login_button_clicked = (state=store.getState()) => (dispatch) => {
let is_authenticating = state.auth.front_end.is_authenticating;
let is_logging_out = state.auth.front_end.is_logging_out;
- 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"