Showing 11 of 158 total issues
File search_index.js
has 464 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
window.esdocSearchIndex = [
[
"github-extended~github",
"class/src/github-extended.js~Github.html",
"<span>Github</span> <span class=\"search-result-import-path\">github-extended</span>",
Function constructor
has 160 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
constructor(options) {
super(options);
let superGetRepo = this.getRepo;
let request = this.request || this._request; // jscs:ignore disallowDanglingUnderscores
Function getRepo
has 155 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
this.getRepo = (user, repo) => {
let repository = superGetRepo(user, repo);
let superRemove = repository.remove;
let superFork = repository.fork;
Function constructor
has a Cognitive Complexity of 34 (exceeds 5 allowed). Consider refactoring. Open
Open
constructor(options) {
super(options);
let superGetRepo = this.getRepo;
let request = this.request || this._request; // jscs:ignore disallowDanglingUnderscores
- 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 exports
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
module.exports = function(config) {
config.set({
browserify: {
debug: true,
transform: [
Function remove
has 51 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
repository.remove = (branchName = 'master', path = '') => {
function removeFile(branchName, path) {
return new Promise((resolve, reject) => {
superRemove(branchName, path, error => {
if (error) {
Function search
has 39 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
repository.search = (string, options = {}) => {
const FILE = 'blob';
const FOLDER = 'tree';
options = Object.assign({
Function toggle
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function toggle(ev) {
var button = ev.target;
var parent = ev.target.parentElement;
while(parent) {
if (parent.tagName === 'TR' && parent.classList.contains('test-describe')) break;
Function removeFolder
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function removeFolder() {
return new Promise((resolve, reject) => {
repository.getRef(`heads/${branchName}`, (error, sha) => {
if (error) {
reject(error);
Avoid deeply nested control flow statements. Open
Open
if (link) location.href = link.href;
Avoid deeply nested control flow statements. Open
Open
if (innerButton && innerButton.classList.contains('opened')) {
innerButton.classList.remove('opened');
innerButton.classList.add('closed');
}