Showing 36 of 165 total issues
Function render
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const auth = TwitterSetting.user().authorized;
return (
<div className="pane-container">
<div className="container main-pane">
Function render
has 71 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(): JSX.Element {
const { settings, selected, preview, row, col, page } = this.props;
return (
<div className="container sidebar">
<div className="form-group">
Function render
has 67 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {active, controllers, body} = this.state;
return (
<section>
<h2>Controller Simulator</h2>
Function render
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const frame = this.props.frame || Frame.new({ size: { width: 800, height: 640 }, position: { left: 0, top: 0 } });
const isAddMode = this.props.frame == null;
const editMode = isAddMode || this.state.editMode;
return (
File missions.ts
has 276 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const catalog: {
[id: number]: {
title: string;
time: number; // ミリ秒
};
Function render
has 58 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { setting } = this.state;
return (
<section className="category screenshot-setting">
<h1>スクショ設定</h1>
Function render
has 48 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render(): JSX.Element {
const {
settings,
selected,
preview,
Function render
has 46 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { active, close, setting } = this.props;
return (
<div className={cn("modal", {active})} id="modal-id">
<a href="#close" className="modal-overlay" aria-label="Close" onClick={() => close()} />
Function render
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { setting } = this.state;
return (
<section className="category twitter-account-setting">
<h1>Twitter連携設定</h1>
Function render
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { deckcapture: d } = this.props;
return (
<div className="columns">
<div className="column col-2">
Function render
has 42 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { setting } = this.state;
return (
<section className="category inapp-button-setting">
<h1>ゲーム内の便利ボタン</h1>
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { setting } = this.state;
return (
<section>
<div className="container">
Function render
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { commits, help } = this.state;
const widgetChang = chrome.extension.getURL("dest/img/widget-chang.png");
return (
<section className="category announce">
Function __main__
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function __main__() {
const { owner, repo, head, base } = getRepositoryInformation();
const octokit = github.getOctokit(process.env.GITHUB_TOKEN).rest;
// 直近のReleaseからのCommitsをすべて取得する
Function render
has 40 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { dssetting, ctxsetting } = this.state;
return (
<section className="category">
<h1>大破進撃防止機能</h1>
Function shouldReleaseStage
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
async function shouldReleaseStage() {
const BRANCH = "develop";
const owner = "KanCraft", repo = "kanColleWidget";
const head = BRANCH, base = "main";
const octokit = getOctokit(process.env.GITHUB_TOKEN).rest;
Function render
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { done, open } = this.props;
const { images, sending } = this.state;
return (
<div className={cn("modal", { active: open })}>
Function __main__
has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring. Open
Open
async function __main__() {
const { owner, repo, head, base } = getRepositoryInformation();
const octokit = github.getOctokit(process.env.GITHUB_TOKEN).rest;
// 直近のReleaseからのCommitsをすべて取得する
- 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 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const { settings, addMode } = this.state;
return (
<section className="category notification-setting">
<div className={"container"}>
Function __main__
has 30 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const __main__ = async (intervalHours: number) => {
const lasttime = new Date(Date.now() - (intervalHours * 60 * 60 * 1000));
const since = [
`${lasttime.getFullYear()}-${("0" + (lasttime.getMonth() + 1)).slice(-2)}-${("0" + lasttime.getDate()).slice(-2)}`,
`${("0" + lasttime.getHours()).slice(-2)}:00:00`,