KanCraft/kanColleWidget

View on GitHub

Showing 36 of 165 total issues

Function render has 83 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  render() {
    const auth = TwitterSetting.user().authorized;
    return (
      <div className="pane-container">
        <div className="container main-pane">
Severity: Major
Found in src/js/Applications/Components/Capture/index.tsx - About 3 hrs to fix

    Function render has 71 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      render(): JSX.Element {
        const { settings, selected, preview, row, col, page } = this.props;
        return (
          <div className="container sidebar">
            <div className="form-group">
    Severity: Major
    Found in src/js/Applications/Components/DeckCapture/SideBar.tsx - About 2 hrs to fix

      Function render has 67 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

        render() {
          const {active, controllers, body} = this.state;
          return (
            <section>
              <h2>Controller Simulator</h2>
      Severity: Major
      Found in src/js/Applications/Components/Options/Debugger/Simulator.tsx - About 2 hrs to fix

        Function render has 66 lines of code (exceeds 25 allowed). Consider refactoring.
        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 (
        Severity: Major
        Found in src/js/Applications/Components/Options/Frames/index.tsx - About 2 hrs to fix

          File missions.ts has 276 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          const catalog: {
            [id: number]: {
              title: string;
              time: number; // ミリ秒
            };
          Severity: Minor
          Found in src/js/Applications/Models/Queue/missions.ts - About 2 hrs to fix

            Function render has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render() {
                const { setting } = this.state;
                return (
                  <section className="category screenshot-setting">
                    <h1>スクショ設定</h1>
            Severity: Major
            Found in src/js/Applications/Components/Options/Screenshot/index.tsx - About 2 hrs to fix

              Function render has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                render(): JSX.Element {
                  const {
                    settings,
                    selected,
                    preview,
              Severity: Minor
              Found in src/js/Applications/Components/DeckCapture/index.tsx - About 1 hr to fix

                Function render has 46 lines of code (exceeds 25 allowed). Consider refactoring.
                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()} />
                Severity: Minor
                Found in src/js/Applications/Components/DeckCapture/SettingModal.tsx - About 1 hr to fix

                  Function render has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render() {
                      const { setting } = this.state;
                      return (
                        <section className="category twitter-account-setting">
                          <h1>Twitter連携設定</h1>
                  Severity: Minor
                  Found in src/js/Applications/Components/Options/TwitterAccount/index.tsx - About 1 hr to fix

                    Function render has 45 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      render() {
                        const { deckcapture: d } = this.props;
                        return (
                          <div className="columns">
                            <div className="column col-2">
                    Severity: Minor
                    Found in src/js/Applications/Components/Options/DeckCapture/index.tsx - About 1 hr to fix

                      Function render has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        render() {
                          const { setting } = this.state;
                          return (
                            <section className="category inapp-button-setting">
                              <h1>ゲーム内の便利ボタン</h1>
                      Severity: Minor
                      Found in src/js/Applications/Components/Options/InAppButton/index.tsx - About 1 hr to fix

                        Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render() {
                            const { setting } = this.state;
                            return (
                              <section>
                                <div className="container">
                        Severity: Minor
                        Found in src/js/Applications/Components/Options/Debugger/DebugModeView.tsx - About 1 hr to fix

                          Function render has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                            render() {
                              const { commits, help } = this.state;
                              const widgetChang = chrome.extension.getURL("dest/img/widget-chang.png");
                              return (
                                <section className="category announce">
                          Severity: Minor
                          Found in src/js/Applications/Components/Options/Announce/index.tsx - About 1 hr to fix

                            Function __main__ has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            async function __main__() {
                              const { owner, repo, head, base } = getRepositoryInformation();
                              const octokit = github.getOctokit(process.env.GITHUB_TOKEN).rest;
                            
                              // 直近のReleaseからのCommitsをすべて取得する
                            Severity: Minor
                            Found in scripts/create-release-pr.ts - About 1 hr to fix

                              Function render has 40 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                render() {
                                  const { dssetting, ctxsetting } = this.state;
                                  return (
                                    <section className="category">
                                      <h1>大破進撃防止機能</h1>
                              Severity: Minor
                              Found in src/js/Applications/Components/Options/DamageSnapshot/index.tsx - About 1 hr to fix

                                Function shouldReleaseStage has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                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;
                                Severity: Minor
                                Found in scripts/should-release.ts - About 1 hr to fix

                                  Function render has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    render() {
                                      const { done, open } = this.props;
                                      const { images, sending } = this.state;
                                      return (
                                        <div className={cn("modal", { active: open })}>
                                  Severity: Minor
                                  Found in src/js/Applications/Components/Capture/Tweet/Modal.tsx - About 1 hr to fix

                                    Function __main__ has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                                    Open

                                    async function __main__() {
                                      const { owner, repo, head, base } = getRepositoryInformation();
                                      const octokit = github.getOctokit(process.env.GITHUB_TOKEN).rest;
                                    
                                      // 直近のReleaseからのCommitsをすべて取得する
                                    Severity: Minor
                                    Found in scripts/create-release-pr.ts - About 1 hr to fix

                                    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

                                      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

                                      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`,
                                      Severity: Minor
                                      Found in scripts/egosearch.ts - About 1 hr to fix
                                        Severity
                                        Category
                                        Status
                                        Source
                                        Language