Showing 70 of 70 total issues
Function render
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(isNormalMode) {
let tp = lithtml.html(`
<nav>
<ul class="list">
<li class="title">
File menu.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
document.addEventListener('DOMContentLoaded', function () {
var menuCollapsed = false,
mobileMenu = document.getElementById('mobile-menu');
var localContextInUrl = '';
File menu.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
document.addEventListener('DOMContentLoaded', function () {
var menuCollapsed = false,
mobileMenu = document.getElementById('mobile-menu');
var localContextInUrl = '';
File menu.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
document.addEventListener('DOMContentLoaded', function () {
var menuCollapsed = false,
mobileMenu = document.getElementById('mobile-menu');
var localContextInUrl = '';
File menu.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
document.addEventListener('DOMContentLoaded', function () {
var menuCollapsed = false,
mobileMenu = document.getElementById('mobile-menu');
var localContextInUrl = '';
Function displayResults
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayResults(res) {
var noResults = res.count == 0;
var groups = {};
$searchResults.toggleClass('no-results', noResults);
Function displayResults
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayResults(res) {
var noResults = res.count == 0;
var groups = {};
$searchResults.toggleClass('no-results', noResults);
Function displayResults
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayResults(res) {
var noResults = res.count == 0;
var groups = {};
$searchResults.toggleClass('no-results', noResults);
Function displayResults
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function displayResults(res) {
var noResults = res.count == 0;
var groups = {};
$searchResults.toggleClass('no-results', noResults);
Function render
has 65 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(isNormalMode) {
let tp = lithtml.html(`
<nav>
<ul class="list">
<li class="title">
File index.ts
has 273 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* Copyright (C) 2022 SensibleMetrics, Inc. (http://sensiblemetrics.io/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Function doWork
has a Cognitive Complexity of 19 (exceeds 7 allowed). Consider refactoring. Open
Open
const doWork = async (repo) => {
const readme = await getFile(gh, repo, "README.md")
if (!readme) {
log(repo, "Could not find a README")
return
- 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 editDistance
has a Cognitive Complexity of 18 (exceeds 7 allowed). Consider refactoring. Open
Open
const editDistance = (s1: string, s2: string) => {
s1 = s1.toLowerCase()
s2 = s2.toLowerCase()
const costs = new Array<number>()
- 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 render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(isNormalMode) {
let tp = lithtml.html(`
<nav>
<ul class="list">
<li class="title">
Function render
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(isNormalMode) {
let tp = lithtml.html(`
<nav>
<ul class="list">
<li class="title">
Function fetchContributors
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const fetchContributors = (
page: string
): Promise<{ contributorsOfPage: Contributor[]; nextPage: string }> => {
return new Promise((resolve, reject) => {
const requestOptions: https.RequestOptions = {
Function bindSearch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindSearch() {
// Bind DOM
$searchInputs = $('#book-search-input input');
$searchResults = $('.search-results');
Function bindSearch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindSearch() {
// Bind DOM
$searchInputs = $('#book-search-input input');
$searchResults = $('.search-results');
Function bindSearch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindSearch() {
// Bind DOM
$searchInputs = $('#book-search-input input');
$searchResults = $('.search-results');
Function bindSearch
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function bindSearch() {
// Bind DOM
$searchInputs = $('#book-search-input input');
$searchResults = $('.search-results');