ilyalehchylin/educats-xamarin

View on GitHub

Showing 106 of 326 total issues

Avoid deeply nested control flow statements.
Open

                            if (queueTheme.Count > 0)
                            {
                                theme = queueTheme.Dequeue();
                            }

    Method OpenDetailedStatistics has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

            Task OpenDetailedStatistics(string userLogin, int subjectId, int groupId,
                int pageIndex, string title, string name);
    Severity: Minor
    Found in source/EduCATS/Helpers/Forms/Pages/Interfaces/IPages.cs - About 45 mins to fix

      Method OpenDetailedStatistics has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

                  string userLogin, int subjectId, int groupId, int pageIndex, string title, string name) =>
      Severity: Minor
      Found in source/EduCATS/Helpers/Forms/Pages/AppPages.cs - About 45 mins to fix

        Consider simplifying this complex logical expression.
        Open

                    if ((Convert.ToInt32(a[0]) > Convert.ToInt32(b[0])) ||
                        (Convert.ToInt32(a[1]) > Convert.ToInt32(b[1]) && Convert.ToInt32(a[0]) == Convert.ToInt32(b[0])) ||
                        (Convert.ToInt32(a[2]) > Convert.ToInt32(b[2]) && Convert.ToInt32(a[0]) == Convert.ToInt32(b[0]) &&
                        Convert.ToInt32(a[1]) == Convert.ToInt32(b[1])))
                    {
        Severity: Major
        Found in source/EduCATS/Pages/Today/Base/ViewModels/TodayPageViewModel.cs - About 40 mins to fix

          Method calculateChartData has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  List<double> calculateChartData(StatsStudentModel stats, LabsVisitingList studentsPractStatistics, LabsVisitingList studentTestStatistics, LaboratoryWorksModel currentPractStudentStatistics, LaboratoryWorksModel worksModel)
          Severity: Minor
          Found in source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs - About 35 mins to fix

            Method OpenParentalStudentsListStats has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    Task OpenParentalStudentsListStats(IPlatformServices services, int pageIndex, int subjectId,
                        List<StatsStudentModel> students, string title);
            Severity: Minor
            Found in source/EduCATS/Helpers/Forms/Pages/Interfaces/IPages.cs - About 35 mins to fix

              Method OpenAddSingleMark has 5 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                      public Task OpenAddSingleMark(string title, string name, LabsVisitingList Marks, TakedLabs prOrLabStat, int subGruop);
              Severity: Minor
              Found in source/EduCATS/Helpers/Forms/Pages/Interfaces/IPages.cs - About 35 mins to fix

                Method OpenParentalStudentsListStats has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                        public async Task OpenParentalStudentsListStats(IPlatformServices services,
                            int pageIndex, int subjectId, List<StatsStudentModel> students, string title) =>
                Severity: Minor
                Found in source/EduCATS/Helpers/Forms/Pages/AppPages.cs - About 35 mins to fix

                  Method OpenAddSingleMark has 5 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                          public async Task OpenAddSingleMark(string title, string name, LabsVisitingList Marks, TakedLabs prOrLabStat, int sub) =>
                  Severity: Minor
                  Found in source/EduCATS/Helpers/Forms/Pages/AppPages.cs - About 35 mins to fix

                    Method saveMarks has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
                    Open

                            private async Task saveMarks()
                            {
                                string body = ""; 
                                string link = "";
                                if (_title == CrossLocalization.Translate("practice_mark"))

                    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

                    Method getAndSetStatistics has a Cognitive Complexity of 22 (exceeds 20 allowed). Consider refactoring.
                    Open

                            protected virtual async Task getAndSetStatistics()
                            {
                                try
                                {
                                    if (CurrentSubject != null)
                    Severity: Minor
                    Found in source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs - About 35 mins 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

                    Avoid too many return statements within this method.
                    Open

                                return Task.FromResult<object>(null);

                      Avoid too many return statements within this method.
                      Open

                                  return Task.FromResult<object>(null);

                        Avoid too many return statements within this method.
                        Open

                                                return Task.FromResult<object>(null);

                          Avoid too many return statements within this method.
                          Open

                                          return StatsPageEnum.LecturesVisiting;
                          Severity: Major
                          Found in source/EduCATS/Pages/Statistics/Base/ViewModels/StatsPageViewModel.cs - About 30 mins to fix

                            Avoid too many return statements within this method.
                            Open

                                                    return Task.FromResult<object>(null);

                              Avoid too many return statements within this method.
                              Open

                                                      return;

                                Avoid too many return statements within this method.
                                Open

                                                        return Task.FromResult<object>(null);

                                  Avoid too many return statements within this method.
                                  Open

                                                          return Task.FromResult<object>(null);

                                    Avoid too many return statements within this method.
                                    Open

                                                            return Task.FromResult<object>(null);
                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language