igara/syonet_seven

View on GitHub

Showing 49 of 138 total issues

Function ToolsSoundPageComponent has 175 lines of code (exceeds 25 allowed). Consider refactoring.
Open

const ToolsSoundPageComponent = () => {
  const dispatch = useDispatch();

  const [name, setName] = useState("");
  const changeName = (event: ChangeEvent<HTMLInputElement>) => setName(event.target.value);
Severity: Major
Found in nodejs/www/pages/tools/sound/index.tsx - About 7 hrs to fix

    Function ToolsScrapingPageComponent has 172 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    const ToolsScrapingPageComponent = () => {
      const state = useSelector((state: AppState) => state);
      const dispatch = useDispatch();
    
      const [url, setURL] = useState("");
    Severity: Major
    Found in nodejs/www/pages/tools/scraping.tsx - About 6 hrs to fix

      Function connectHandler has 156 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const connectHandler = async (event: APIGatewayEvent) => {
        const connectionId = event.requestContext.connectionId;
        if (!connectionId) return;
      
        const body = event.body as any;
      Severity: Major
      Found in nodejs/websocket/ssb/src/lambda.ts - About 6 hrs to fix

        Function ToolsSpeechPageComponent has 109 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        const ToolsSpeechPageComponent = () => {
          const dispatch = useDispatch();
          const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
            onCompleted: async checkAuth => {
              if (!checkAuth.checkAuth) {
        Severity: Major
        Found in nodejs/www/pages/tools/speech.tsx - About 4 hrs to fix

          Function ToolsVRMPageComponent has 92 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          const ToolsVRMPageComponent = () => {
            const dispatch = useDispatch();
            const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
              onCompleted: async checkAuth => {
                if (!checkAuth.checkAuth) {
          Severity: Major
          Found in nodejs/www/pages/tools/vrm/index.tsx - About 3 hrs to fix

            Function SidebarComponent has 80 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            export const SidebarComponent = () => {
              const states = useSelector((state: AppState) => state);
              const dispatch = useDispatch();
            
              return (
            Severity: Major
            Found in nodejs/www/components/common/sidebar.tsx - About 3 hrs to fix

              Function ToolsSsbPageComponent has 80 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              const ToolsSsbPageComponent = () => {
                const dispatch = useDispatch();
                const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
                  onCompleted: async checkAuth => {
                    if (!checkAuth.checkAuth) {
              Severity: Major
              Found in nodejs/www/pages/tools/ssb.tsx - About 3 hrs to fix

                Function connectHandler has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
                Open

                export const connectHandler = async (event: APIGatewayEvent) => {
                  const connectionId = event.requestContext.connectionId;
                  if (!connectionId) return;
                
                  const body = event.body as any;
                Severity: Minor
                Found in nodejs/websocket/ssb/src/lambda.ts - About 2 hrs 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 vrmLoad has 69 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                const vrmLoad = async (divElement: HTMLDivElement, videoElement: HTMLVideoElement) => {
                  const { GLTFLoader } = await import("three/examples/jsm/loaders/GLTFLoader");
                  const { OrbitControls } = await import("three/examples/jsm/controls/OrbitControls");
                
                  const width = 320;
                Severity: Major
                Found in nodejs/www/pages/tools/vrm/index.tsx - About 2 hrs to fix

                  Function vrmLoad has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const vrmLoad = async (divElement: HTMLDivElement, videoElement: HTMLVideoElement) => {
                    const { GLTFLoader } = await import("three/examples/jsm/loaders/GLTFLoader");
                    const { OrbitControls } = await import("three/examples/jsm/controls/OrbitControls");
                  
                    const width = 320;
                  Severity: Minor
                  Found in nodejs/www/pages/tools/vrm/index.tsx - About 2 hrs 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 ToolsSoundPageComponent has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
                  Open

                  const ToolsSoundPageComponent = () => {
                    const dispatch = useDispatch();
                  
                    const [name, setName] = useState("");
                    const changeName = (event: ChangeEvent<HTMLInputElement>) => setName(event.target.value);
                  Severity: Minor
                  Found in nodejs/www/pages/tools/sound/index.tsx - About 2 hrs 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 BlogsPageComponent has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  const BlogsPageComponent = () => {
                    const dispatch = useDispatch();
                  
                    const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
                      onCompleted: async checkAuth => {
                  Severity: Major
                  Found in nodejs/www/pages/blogs/index.tsx - About 2 hrs to fix

                    Function ToolsPageComponent has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    const ToolsPageComponent = () => {
                      const dispatch = useDispatch();
                      const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
                        onCompleted: async checkAuth => {
                          if (!checkAuth.checkAuth) {
                    Severity: Major
                    Found in nodejs/www/pages/tools/index.tsx - About 2 hrs to fix

                      Function changeFile has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                        const changeFile = async (event: ChangeEvent<HTMLInputElement>) => {
                          if (event.target.files && event.target.files[0]) {
                            const waveformElement = document.getElementById("waveform");
                            if (waveformElement) {
                              const childElement = waveformElement.firstChild;
                      Severity: Major
                      Found in nodejs/www/pages/tools/sound/index.tsx - About 2 hrs to fix

                        Function BlogsSpeakerdeckDeskPageComponent has 52 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        const BlogsSpeakerdeckDeskPageComponent = () => {
                          const state = useSelector((state: AppState) => state);
                          const dispatch = useDispatch();
                          const router = useRouter();
                          let name = process.browser
                        Severity: Major
                        Found in nodejs/www/pages/blogs/speakerdeck/[name].tsx - About 2 hrs to fix

                          Function google has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                          export const google = async (req: express.Request, res: express.Response) => {
                            let query = "";
                          
                            try {
                              if (!req.user) throw new Error("not user");
                          Severity: Minor
                          Found in nodejs/api/src/passport/google.ts - About 2 hrs to fix

                            Function github has 50 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                            export const github = async (req: express.Request, res: express.Response) => {
                              let query = "";
                            
                              try {
                                if (!req.user) throw new Error("not user");
                            Severity: Minor
                            Found in nodejs/api/src/passport/github.ts - About 2 hrs to fix

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

                              const BlogsHatenaPageComponent = () => {
                                const state = useSelector((state: AppState) => state);
                                const dispatch = useDispatch();
                              
                                const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
                              Severity: Minor
                              Found in nodejs/www/pages/blogs/hatena/index.tsx - About 1 hr to fix

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

                                const BlogsQiitaPageComponent = () => {
                                  const state = useSelector((state: AppState) => state);
                                  const dispatch = useDispatch();
                                
                                  const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
                                Severity: Minor
                                Found in nodejs/www/pages/blogs/qiita/index.tsx - About 1 hr to fix

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

                                  const BlogsSpeakerdeckPageComponent = () => {
                                    const state = useSelector((state: AppState) => state);
                                    const dispatch = useDispatch();
                                  
                                    const [loadCheckAuth] = useLazyQuery<CheckAuth>(CHECK_AUTH, {
                                  Severity: Minor
                                  Found in nodejs/www/pages/blogs/speakerdeck/index.tsx - About 1 hr to fix
                                    Severity
                                    Category
                                    Status
                                    Source
                                    Language