Showing 226 of 488 total issues
File FlowListView.cs
has 383 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using Xamarin.Forms;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
File BusinessLayer.cs
has 381 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using NSWallet.Shared.Helpers.Logs.AppLog;
Class PlatformSpecific
has 36 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public static class PlatformSpecific
{
public static void SetStatusBarColor(Color color) {
DependencyService.Get<IThemeNative>().SetColors(color);
}
Class DataAccessLayer
has 35 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public partial class DataAccessLayer
{
// Static members, everything needed for singleton initialization
static string DBFile;
static DataAccessLayer DAL;
File NSWFormsItemModel.cs
has 347 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using Xamarin.Forms;
using NSWallet.Shared;
using System.IO;
Method GeneratePDF
has 107 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void GeneratePDF()
{
CleanCache();
// Get NSWItems
Class ManageFieldViewModel
has 33 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public class ManageFieldViewModel : ViewModel
{
// Callbacks
public Action ClosePopupCommandCallback { get; set; }
public Action ShowPopupCommandCallback { get; set; }
Method AddViewToLayoutAutoHeightDisabled
has a Cognitive Complexity of 43 (exceeds 20 allowed). Consider refactoring. Open
Open
void AddViewToLayoutAutoHeightDisabled(View view, int containerCount, int colNumber)
{
double desiredColumnWidth = 1d / _desiredColumnCount;
Rectangle bounds = Rectangle.Zero;
- 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
Method AddViewToLayoutAutoHeightDisabled
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
void AddViewToLayoutAutoHeightDisabled(View view, int containerCount, int colNumber)
{
double desiredColumnWidth = 1d / _desiredColumnCount;
Rectangle bounds = Rectangle.Zero;
Method changeGroup
has a Cognitive Complexity of 41 (exceeds 20 allowed). Consider refactoring. Open
Open
void changeGroup(ItemModel item)
{
PopupPagesUIController.LaunchChangeGroupPopup((x) => {
if (x.Result != TR.Cancel) {
Device.BeginInvokeOnMainThread(() => {
- 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
Method OnBindingContextChanged
has 93 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
protected override void OnBindingContextChanged()
{
base.OnBindingContextChanged();
var container = BindingContext as IList;
Class AppPages
has 30 methods (exceeds 20 allowed). Consider refactoring. Open
Open
public static class AppPages
{
public static void Main()
{
var navPage = new NavigationPage(new MainScreenView())
File BusinessFixture.cs
has 318 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System.IO;
using NSWallet.Shared;
using NUnit.Framework;
namespace NSWallet.UnitTests
File DefaultTheme.cs
has 316 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using Xamarin.Forms;
namespace NSWallet
{
public class DefaultTheme : ITheme
Method LocalizationExceptionsCommon
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
static bool LocalizationExceptionsCommon(string trTag)
{
switch (trTag)
{
case "admin_password_placeholder":
Method ExecuteSelectedItemCommand
has 88 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
void ExecuteSelectedItemCommand(object obj)
{
IsEditItemPanel = false;
IsEditFolderPanel = false;
if (obj == null) return;
File Pages.cs
has 311 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using NSWallet.Enums;
using NSWallet.NetStandard;
using NSWallet.NetStandard.Interfaces;
Method ExecuteMenuTappedCommand
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
void ExecuteMenuTappedCommand(object obj)
{
if (obj != null) {
var popupItem = (PopupItem)obj;
switch (popupItem.Action) {
File LabelScreenViewModel.cs
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.Diagnostics;
Method AddCheckbox
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
void AddCheckbox(StackLayout settingsLayout, string settingName, string checkedProperty, string menuIcon, string toggleCommand, string chosenSelectionProperty = null, bool isPremium = false)
{
var checkboxLayout = new StackLayout {
VerticalOptions = LayoutOptions.CenterAndExpand,
HorizontalOptions = LayoutOptions.Fill,