igor-starostenko/report_factory-web

View on GitHub

Showing 85 of 232 total issues

Function UpdateUser has 89 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function UpdateUser(props) {
  const [isUpdatePasswordModalOpen, setUpdatePasswordModal] = useState(false);
  const [isDeleteUserModalOpen, setDeleteUserModal] = useState(false);

  const {
Severity: Major
Found in src/containers/update_user.jsx - About 3 hrs to fix

    Function User has 86 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    function User(props) {
      const [isApiKeyModalOpen, setApiKeyModal] = useState(false);
    
      const {
        isAdmin,
    Severity: Major
    Found in src/containers/user.jsx - About 3 hrs to fix

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

      function Projects(props) {
        const { xApiKey, projects, isAdmin, loaded } = props;
      
        useEffect(() => {
          props.queryProjects(xApiKey, { lastDays: days });
      Severity: Major
      Found in src/containers/projects.jsx - About 2 hrs to fix

        Function EditUserForm has 68 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function EditUserForm(props) {
          const {
            isAdmin,
            isCurrent,
            handleSubmit,
        Severity: Major
        Found in src/containers/edit_user_form.jsx - About 2 hrs to fix

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

          function ProjectRspecReports(props) {
            const { edges, pageInfo, projectName, query, totalCount, xApiKey } = props;
          
            function fetchProjectRspecReports(options) {
              if (query.page !== options.page) {
          Severity: Major
          Found in src/containers/project_rspec_reports.jsx - About 2 hrs to fix

            Function ScenariosList has 65 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              function ScenariosList(props) {
                const [scenarios, setScenarios] = useState([]);
                const [page, setPage] = useState(1);
                const [perPage, setPerPage] = useState(10);
                const [total, setTotal] = useState(0);
            Severity: Major
            Found in src/components/scenarios_list.jsx - About 2 hrs to fix

              Function UpdateProject has 59 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              function UpdateProject(props) {
                const [isDeleteProjectModalOpen, setDeleteProjectModel] = useState(false);
                const { dispatch, isAdmin, project, projectName, xApiKey } = props;
                const hasSameProject = hasProject(project, projectName);
              
              
              Severity: Major
              Found in src/containers/update_project.jsx - About 2 hrs to fix

                Function Reports has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                function Reports(props) {
                  const { edges, pageInfo, query, totalCount, xApiKey } = props;
                
                  function fetchRspecReports(options) {
                    if (query.page !== options.page) {
                Severity: Major
                Found in src/containers/reports.jsx - About 2 hrs to fix

                  Function Scenarios has 57 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  function Scenarios(props) {
                    const {
                      xApiKey,
                      scenarios,
                      scenariosList,
                  Severity: Major
                  Found in src/containers/scenarios.jsx - About 2 hrs to fix

                    Function Project has 53 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    function Project(props) {
                      const { project, projectName, filters, xApiKey, scenariosDetails } = props;
                    
                      function filterProject({ filterName, lastDays, lastMonths }) {
                        props.setProjectFilters(projectName, {
                    Severity: Major
                    Found in src/containers/project.jsx - About 2 hrs to fix

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

                      function SearchReports(props) {
                        useEffect(
                          () => () => {
                            props.reset('searchReportsForm');
                            props.setSearch([]);
                      Severity: Minor
                      Found in src/containers/search_reports.jsx - About 1 hr to fix

                        Function Login has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                        function Login(props) {
                          function onSubmit(values, dispatch) {
                            return new Promise((resolve, reject) => {
                              dispatch(props.signIn(values)).then(response => {
                                if (!response.payload.data) {
                        Severity: Minor
                        Found in src/containers/login.jsx - About 1 hr to fix

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

                          export default function SearchScenarios(props) {
                            const [inputValue, setInputValue] = useState('');
                            const { search } = props;
                          
                            function handleSubmit(event) {
                          Severity: Minor
                          Found in src/components/search_scenarios.jsx - About 1 hr to fix

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

                            function EditProjectForm(props) {
                              function onSubmit(values, dispatch) {
                                props.action(values.name).then(response => {
                                  if (!response.payload.data) {
                                    return dispatch(editProjectFailure(response.payload));
                            Severity: Minor
                            Found in src/containers/edit_project_form.jsx - About 1 hr to fix

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

                              export default function Scenario(props) {
                                const {
                                  projectName,
                                  scenarioDetails,
                                  status,
                              Severity: Minor
                              Found in src/components/scenario.jsx - About 1 hr to fix

                                Function Navigation has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                function Navigation(props) {
                                  const [isOpen, setOpen] = useState(false);
                                
                                  function toggle() {
                                    setOpen(!isOpen);
                                Severity: Minor
                                Found in src/components/navigation.jsx - About 1 hr to fix

                                  Function ProjectScenarios has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                  function ProjectScenarios(props) {
                                    useEffect(() => {
                                      props.setScenarios();
                                    }, []);
                                  
                                  
                                  Severity: Minor
                                  Found in src/components/project_scenarios.jsx - About 1 hr to fix

                                    Function Users has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                    function Users(props) {
                                      const { xApiKey, users, isAdmin } = props;
                                    
                                      useEffect(() => {
                                        props.getUsers(xApiKey);
                                    Severity: Minor
                                    Found in src/containers/users.jsx - About 1 hr to fix

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

                                      export default function RspecReportExamplesList(props) {
                                        const { examples } = props;
                                      
                                        if (!examples) {
                                          return <Loading />;
                                      Severity: Minor
                                      Found in src/components/rspec_report_examples_list.jsx - About 1 hr to fix

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

                                        function RspecReport(props) {
                                          const { report, reportId, xApiKey } = props;
                                        
                                          useEffect(() => {
                                            if (!report || report.id !== reportId) {
                                        Severity: Minor
                                        Found in src/containers/rspec_report.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language